Sass and Media Queries

Posted: January 16, 2013 Comments


Since the @media directive was introduced in Sass, there’s been a small debate when reviewing the CSS output. Many realized that the media query is repeated with each use as seen in this example. To some, this is a big deal and to others, not so much. This post is really for those who think that this is a big deal.

This was interesting to read. I have yet to utilize Sass to process my media queries and instead still write them by hand, but the information offered in this article has me reconsidering that. I’ve changed the way I write my CSS quite a bit and I now heavily rely on Sass partials. Keeping all of my media queries at the base of some arbitrary partial isn’t really conducive to maintenance, so Sass’ @media directive looks all the more enticing.

Get my newsletter

Receive periodic updates right in the mail!

  • This field is for validation purposes and should be left unchanged.

Leave a Reply

Your email address will not be published. Required fields are marked *