A better Sass mixin for Retina graphics

https://github.com/kaelig/hidpi
by kaelig • 14 years ago
1 0 14 years ago

Most of us use @media queries to serve "Retina" graphics to mobiles phones and Macbook Pros.

Thing is, Retina graphics are really hard to test on a regular display.

The hidpi() mixin has a debug mode that enables us developers to actually test if our implementation works.

Also, if your project uses Compass on top of Sass, the hidpi() mixin can do most of the job for you (see README for more information).

Tested on many devices featuring a pixel ratio superior to 1.3, including Nexus 7, Macbook Pro Retina, iPhone 4+, Samsung Galaxy S3…

All contributions are welcome.

Related Stories

Loading related stories...

Source preview

github.com