Permalink
Browse files

Add high dpi media queries for Firefox and Opera

min--moz... for Firefox < v16
min-resolution 1.5dppx for Firefox > 16
http://www.w3.org/TR/css3-values/#dppx
  • Loading branch information...
1 parent cf6981a commit 250d6abbafcd8abb00af9f33b80c9a9335fe7869 @feelepxyz feelepxyz committed Aug 10, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/retina.less
View
@@ -1,11 +1,13 @@
// retina.less
// A helper mixin for applying high-resolution background images (http://www.retinajs.com)
+@highdpi: ~"(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)";
+
.at2x(@path, @w: auto, @h: auto) {
background-image: url(@path);
@at2x_path: ~`"@{path}".split('.').slice(0, "@{path}".split('.').length - 1).join(".") + "@2x" + "." + "@{path}".split('.')["@{path}".split('.').length - 1]`;
- @media all and (-webkit-min-device-pixel-ratio : 1.5) {
+ @media @highdpi {
background-image: url(@at2x_path);
background-size: @w @h;
}

0 comments on commit 250d6ab

Please sign in to comment.