Created
July 28, 2012 19:35
-
-
Save StanAngeloff/3194506 to your computer and use it in GitHub Desktop.
SASS buffers draft
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
// See https://github.com/nex3/sass/issues/116 | |
$device-size: small; | |
$device-width: 640px; | |
body { | |
color: white; | |
@buffer #{$device-size}-screen { | |
color: black; | |
} | |
} | |
h1 { | |
color: white; | |
@buffer #{$device-size}-screen { | |
color: black; | |
.no-js & { color: red; } | |
} | |
} | |
@media only screen and (max-width: #{$device-width}) { | |
@flush #{$device-size}-screen; | |
} |
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
// SASS indented version | |
$device-size: small | |
$device-width: 640px | |
body | |
color: white | |
>#{$device-size}-screen | |
color: black | |
h1 | |
color: white | |
>#{$device-size}-screen | |
color: black | |
.no-js & | |
color: red | |
@media only screen and (max-width: #{$device-width}) | |
<#{$device-size}-screen |
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
body { | |
color: white; } | |
h1 { | |
color: white; } | |
@media only screen and (max-width: 640px) { | |
body { | |
color: black; } | |
h1 { | |
color: black; } | |
.no-js h1 { | |
color: red; } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment