Permalink
Browse files

Add hidpi() mixin

  • Loading branch information...
1 parent 05429c7 commit b197e3bfee57a34702b97642eb6d1fdbf7ed05fa Reda Lemeden committed Oct 9, 2012
Showing with 11 additions and 1 deletion.
  1. +1 −0 app/assets/stylesheets/_bourbon.scss
  2. +10 −0 app/assets/stylesheets/addons/_hidpi-media-query.scss
  3. +0 −1 bourbon.gemspec
@@ -39,3 +39,4 @@
@import "addons/html5-input-types";
@import "addons/position";
@import "addons/timing-functions";
+@import "addons/hidpi-media-query";
@@ -0,0 +1,10 @@
+// HiDPI mixin. Default value set to 1.3 to target Google Nexus 7 (http://bjango.com/articles/min-device-pixel-ratio/)
+@mixin hidpi($ratio: 1.3) {
+ @media only screen and (-webkit-min-device-pixel-ratio: $ratio),
+ only screen and (min--moz-device-pixel-ratio: $ratio),
+ only screen and (-o-min-device-pixel-ratio: #{$ratio*10}/10),
+ only screen and (min-resolution: #{round($ratio*96)}dpi),
+ only screen and (min-resolution: #{$ratio}dppx) {
+ @content;
+ }
+}
View
@@ -28,7 +28,6 @@ that support only CSS3 prefixed properties.
s.add_dependency('sass', '>= 3.2')
s.add_dependency('thor')
- s.add_dependency('sass', '>= 3.2')
s.add_development_dependency('aruba', '~> 0.4')
s.add_development_dependency('rake')

0 comments on commit b197e3b

Please sign in to comment.