Resolution mixin for SASS

Writing a good (backwards compatible & future proof) media query to target devices with a specific pixel density is a lot harder than you might think at first.

We’ve come up with the following mixin which improves readability of the code and abstracts away all the vendor prefix clutter:

View Gist

The implementation is pretty straightforward thanks to the new @content keyword in SASS 3.2:

View Gist

About the Author

David is a creative web developer and co-founder at 14islands.

You can follow David on Twitter

.
<< Read more 14islands.com