Last active
August 29, 2015 14:16
-
-
Save taupecat/ddda78b8ed608d3edf6c to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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.12) | |
// Compass (v1.0.3) | |
// Breakpoint (v2.5.0) | |
// ---- | |
@import "breakpoint"; | |
/** Breakpoint settings */ | |
$breakpoints: ( | |
"medium": 690px, | |
"wide": 960px, | |
"hidpi": 1.5dppx | |
); | |
/** | |
* bp: return the requested breakpoint | |
* @param {string} $value The key in the Sass map | |
* @return {number} The value in the Sass map | |
* | |
* Requires $breakpoints Sass map to be set. | |
*/ | |
@function bp( $value ) { | |
@if not map-has-key( $breakpoints, $value ) { | |
@error "ERROR: Requested value '#{$value}' was not found in the breakpoints map."; | |
} | |
$breakpoint: map-get( $breakpoints, $value ); | |
@return $breakpoint; | |
} | |
.icon { | |
background-image: url("../images/icon.png"); | |
@include breakpoint( bp( "hdpi" ) ) { // Note the misspelling | |
background-image: url("../images/[email protected]"); | |
} | |
} |
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
ERROR: Requested value 'hdpi' was not found in the breakpoints map. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment