Created
July 29, 2015 12:57
-
-
Save eduardoboucas/c3d7d4953d00d10141d3 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.14) | |
// Compass (v1.0.3) | |
// Include Media (v1.3.0) | |
// ---- | |
@import 'include-media'; | |
// ----- Plugin starts here ----- | |
$emBreakpoints: (); | |
/// Function converts / calculates px to em | |
/// @param {number} $size - Width in px | |
/// @param {number} $base - Base size in px, defaults 16px | |
/// @return {number} Width in em | |
@function em-calc($size, $base: 16px) { | |
@return $size / $base * 1em; | |
} | |
@each $breakpoint in $breakpoints { | |
$emBreakpoints: map-merge($emBreakpoints, (nth($breakpoint, 1): em-calc(nth($breakpoint, 2)))); | |
} | |
$breakpoints: $emBreakpoints; | |
// ----- Plugin ends here ----- | |
@include media('>=tablet') { | |
.module1 { | |
color: tomato; | |
} | |
} |
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
@media (min-width: 48em) { | |
.module1 { | |
color: tomato; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment