Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
=respond-to($val, $query: min-width, $media: screen)
@media #{$media} and ($query: $val)
// ----- Sample Usage ----- //
width: 700px
+respond-to(500px, max-width)
width: 500px
+respond-to(800px, max-width, print)
width: 800px
/* ----- Sample Compile ----- */
@media screen and (min-width: 700px) {
p {
width: 700px;
@media screen and (max-width: 500px) {
p {
width: 500px;
@media print and (max-width: 800px) {
p {
width: 800px;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment