Skip to content

Instantly share code, notes, and snippets.

@StanAngeloff
Created July 28, 2012 19:35
Show Gist options
  • Save StanAngeloff/3194506 to your computer and use it in GitHub Desktop.
Save StanAngeloff/3194506 to your computer and use it in GitHub Desktop.
SASS buffers draft
// 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;
}
// 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
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