Last active
October 19, 2015 11:47
-
-
Save chris-muller/011854880ffc44c4beee to your computer and use it in GitHub Desktop.
A Sass function that lets you detect if a value is a unitless integer.
This file contains hidden or 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
@function isInt($value) { | |
@if round($value) == $value and unitless($value) { | |
@return true; | |
} | |
@return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment