Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add hidpi() mixin

  • Loading branch information...
commit b197e3bfee57a34702b97642eb6d1fdbf7ed05fa 1 parent 05429c7
@kaishin kaishin authored
View
1  app/assets/stylesheets/_bourbon.scss
@@ -39,3 +39,4 @@
@import "addons/html5-input-types";
@import "addons/position";
@import "addons/timing-functions";
+@import "addons/hidpi-media-query";
View
10 app/assets/stylesheets/addons/_hidpi-media-query.scss
@@ -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
1  bourbon.gemspec
@@ -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')
Please sign in to comment.
Something went wrong with that request. Please try again.