Created
March 27, 2015 00:35
-
-
Save JulianJorgensen/dad67a11f17d2ea7fe7a to your computer and use it in GitHub Desktop.
lower and upper bound sass functions
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
| // RANGES | |
| // We use these functions to define ranges for various things, like media queries. | |
| @function lower-bound($range) { | |
| @if length($range) <= 0 { | |
| @return 0; | |
| } | |
| @return nth($range, 1); | |
| } | |
| @function upper-bound($range) { | |
| @if length($range) < 2 { | |
| @return 999999999999; | |
| } | |
| @return nth($range, 2); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment