Skip to content

Instantly share code, notes, and snippets.

@ethanmuller ethanmuller/_base.scss Secret
Last active Dec 17, 2015

Embed
What would you like to do?
Examples for sb-media Foundry post
@import "mixins"; // contains sb-media mixin
@import "box";
.box {
background-color: blue;
@include sb-media(45em) {
background-color: purple;
}
}
$no-mq-support: false !default;
$serve-to-nomq-max-width: 60em;
@mixin sb-media($query) {
@if $no-mq-support{
@if $query < $serve-to-nomq-max-width {
@content;
}
} @else {
@media ( 'min-width:' + $query ) {
@content;
}
}
}
/* I'm rendered CSS */
.box {
background-color: blue;
@media (min-width: 45em) {
background-color: purple;
}
}
@import "base";
/* I'm rendered CSS */
.box {
background-color: blue;
background-color: purple;
}
$no-mq-support: true;
@import "base";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.