Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 250d6abbafcd8abb00af9f33b80c9a9335fe7869 1 parent cf6981a
@harrison harrison authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/retina.less
View
4 src/retina.less
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.