Skip to content

Instantly share code, notes, and snippets.

@kohlmannj
Last active February 24, 2016 19:47
Show Gist options
  • Save kohlmannj/f7069bf558bed7371fb5 to your computer and use it in GitHub Desktop.
Save kohlmannj/f7069bf558bed7371fb5 to your computer and use it in GitHub Desktop.
// Sass Code
.selector {
// This mixin's content block will be wrapped in this media query:
// `@media (min-width: 540px)`
@include size-class(regular) {
width: span(5);
@include font-size(auto, vw) {
// Will output a font-size property and value within a media query:
// `@media (max-width: 540px)`
@include min-font-size-at(540px);
}
}
}
// CSS Output
@media (min-width: 540px) {
.selector {
width: /* whatever width */;
font-size: 1.25vw;
}
}
/* This media query below doesn't work */
@media (min-width: 540px) and (max-width: 540px) {
.selector {
font-size: 6.75px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment