Skip to content

This-To-That Media Queries

Latest
Compare
Choose a tag to compare
@quagliero quagliero released this 11 Sep 08:04

Moar media queries!

Now you can target things between specific breakpoints, rather than just the 'this and below' approach from previous versions. So if you wanted something to take effect between 'sm' and 'md' viewports:

.thing {
    font-size: 2em;

    @include media(sm-to-md) {
        font-size: 1.6em;
    }
}

Any of the media query combos are available for your namespaced media queries using the 'to' keyword, with the smaller value always on the left, e.g. xs-to-lg, md-to-lg, sm-to-xl etc