Last active
August 29, 2015 14:05
-
-
Save timknight/d4fbf8ffb28d8685d89f to your computer and use it in GitHub Desktop.
Convert percentages to decimal function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.1) | |
// Compass (v1.0.1) | |
// ---- | |
@function decimal($percentage) { | |
$decimal: $percentage / 100; // Returns the number as a decimal | |
$decimal: $decimal / ($decimal * 0 + 1); // Removes the % unit off the number | |
@return $decimal; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment