Permalink
Browse files

Add retina MQ. Closes #152

  • Loading branch information...
1 parent 3800e62 commit 535cc7f8949194c9aec3cf42b52578e62f9f1636 @csswizardry committed Mar 19, 2013
Showing with 21 additions and 0 deletions.
  1. +21 −0 generic/_mixins.scss
View
@@ -115,6 +115,27 @@
/**
+ * Media query for targetting retina devices, e.g.:
+ *
+ .foo{
+ background-image:url(1x.png);
+ @include retina(){
+ background-image:url(2x.png);
+ }
+ }
+ *
+ */
+@mixin retina{
+ @media print,
+ (-webkit-min-device-pixel-ratio:1.25),
+ (-o-min-device-pixel-ratio:5/4),
+ (min-resolution:120dpi){
+ @content;
+ }
+}
+
+
+/**
* CSS arrows!!! But... before you read on, you might want to grab a coffee...
*
* This mixin creates a CSS arrow on a given element. We can have the arrow

0 comments on commit 535cc7f

Please sign in to comment.