1.0.4 • Published 4 years ago
modernscssbreakpoint v1.0.4
breakpoint()
is a Sass mixin that helps you compose media queries in an elegant
way.
Here is a very basic example:
$breakpoints: (
mobile: 320px,
tablet: 740px,
desktop: 980px,
wide: 1300px
);
@import 'breakpoint';
.test {
@include breakpoint($from: mobile, $until: tablet) {
background: red;
}
@include breakpoint($from: tablet) {
background: green;
}
}
Compiles to:
@media (min-width: 20em) and (max-width: 46.24em) {
.test {
background: red;
}
}
@media (min-width: 46.25em) {
.test {
background: green;
}
}