Created
June 4, 2015 08:38
-
-
Save samueljseay/663615b7ddbd80965d84 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
<div class='color'></div> | |
<div class='color-dark'></div> | |
<div class='color-darker'></div> |
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.13) | |
// Compass (v1.0.3) | |
// Bourbon (v4.2.3) | |
// Neat (v1.6.0) | |
// ---- | |
@import "bourbon/bourbon"; | |
@import "neat/neat"; | |
$mobile: min-width 320px max-width 720px; | |
$custom: max-width 720px; | |
@mixin multiplemedia($queries...) { | |
@each $query in $queries { | |
$loop-to: length($query); | |
$media-query: "screen and "; | |
$i: 1; | |
@while $i <= $loop-to { | |
$media-query: $media-query + "(" + nth($query, $i) + ": " + nth($query, $i + 1) + ") "; | |
@if ($i + 1) != $loop-to { | |
$media-query: $media-query + "and "; | |
} | |
$i: $i + 2; | |
} | |
@media #{$media-query} { | |
@content; | |
} | |
} | |
} | |
.foo { | |
@include multiplemedia($mobile, $custom) { | |
font-size: 20px; | |
}; | |
} | |
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
* { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
} | |
@media screen and (min-width: 320px) and (max-width: 720px) { | |
.foo { | |
font-size: 20px; | |
} | |
} | |
@media screen and (max-width: 720px) { | |
.foo { | |
font-size: 20px; | |
} | |
} |
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
<div class='color'></div> | |
<div class='color-dark'></div> | |
<div class='color-darker'></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment