Using prebuilt libraries

So far we've covered the basics of creating media queries using Less—it's at this point that you're probably thinking, "Surely there's a prebuilt library we could use to help us here, right…?"

Well, in this instance, unfortunately there isn't a prebuilt library we can use; it's down to us to build each query manually! This is no bad thing, as media queries can be seen as something of a workaround, which can lead to bloated code if we're not careful. It will be difficult, if not near impossible, to cater for all breakpoints. Each project will require support for a specific set of break points, which will not necessarily be the same for every site.

In addition, media queries are natively supported in all modern browsers; the ...

Get Learning Less.js now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.