Skip to content

Instantly share code, notes, and snippets.

@JulianJorgensen
Created March 27, 2015 00:35
Show Gist options
  • Select an option

  • Save JulianJorgensen/dad67a11f17d2ea7fe7a to your computer and use it in GitHub Desktop.

Select an option

Save JulianJorgensen/dad67a11f17d2ea7fe7a to your computer and use it in GitHub Desktop.
lower and upper bound sass functions
// 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