Last active
November 2, 2016 20:14
-
-
Save jonnymaceachern/9d765b1a5bb97c0cf71d03b0ecd601bb to your computer and use it in GitHub Desktop.
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
@import "mq"; | |
$mq-breakpoints: ( | |
xs: 320px, | |
sm: 740px, | |
md: 980px, | |
lg: 1300px, | |
); | |
// ------------------------------ | |
// Example | |
// ------------------------------ | |
.block { | |
&__element { | |
color: navy; | |
font-size: 15px; | |
&--modifier { | |
background-color: navy; | |
color: #fff; | |
} | |
} | |
// From | |
@include mq($from: sm) { | |
&__element { | |
font-size: 20px; | |
} | |
} | |
@include mq($from: md) { | |
&__element { | |
font-size: 25px; | |
} | |
} | |
@include mq($from: lg) { | |
&__element { | |
font-size: 30px; | |
} | |
} | |
// Until | |
@include mq($until: sm) {} | |
@include mq($until: md) {} | |
@include mq($until: lg) {} | |
} | |
// Output | |
.block__element { | |
color: navy; | |
font-size: 15px; | |
} | |
.block__element--modifier { | |
background-color: navy; | |
color: #fff; | |
} | |
@media (min-width: 46.25em) { | |
.block__element { | |
font-size: 20px; | |
} | |
} | |
@media (min-width: 61.25em) { | |
.block__element { | |
font-size: 25px; | |
} | |
} | |
@media (min-width: 81.25em) { | |
.block__element { | |
font-size: 30px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment