From: Evan Sosenko Date: Thu, 9 Apr 2015 22:29:25 +0000 (-0700) Subject: Add retina media query to scss. X-Git-Tag: v5.5.2~32^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F6454%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Add retina media query to scss. --- diff --git a/doc/pages/media-queries.html b/doc/pages/media-queries.html index 82aa4580f..9ea39eff5 100644 --- a/doc/pages/media-queries.html +++ b/doc/pages/media-queries.html @@ -75,6 +75,15 @@ $xlarge-only: "#{$screen} and (min-width:#{lower-bound($xlarge-range)}) and (max $xxlarge-up: "#{$screen} and (min-width:#{lower-bound($xxlarge-range)})" !default; $xxlarge-only: "#{$screen} and (min-width:#{lower-bound($xxlarge-range)}) and (max-width:#{upper-bound($xxlarge-range)})" !default; + +$retina: ( + "#{$screen} and (-webkit-min-device-pixel-ratio: 2)", + "#{$screen} and (min--moz-device-pixel-ratio: 2)", + "#{$screen} and (-o-min-device-pixel-ratio: 2/1)", + "#{$screen} and (min-device-pixel-ratio: 2)", + "#{$screen} and (min-resolution: 192dpi)", + "#{$screen} and (min-resolution: 2dppx)" +); ```

Style With Sass

diff --git a/scss/foundation/_settings.scss b/scss/foundation/_settings.scss index 200b175c0..915f1ccb8 100644 --- a/scss/foundation/_settings.scss +++ b/scss/foundation/_settings.scss @@ -94,6 +94,15 @@ // $xxlarge-up: "#{$screen} and (min-width:#{lower-bound($xxlarge-range)})"; // $xxlarge-only: "#{$screen} and (min-width:#{lower-bound($xxlarge-range)}) and (max-width:#{upper-bound($xxlarge-range)})"; +// $retina: ( +// "#{$screen} and (-webkit-min-device-pixel-ratio: 2)", +// "#{$screen} and (min--moz-device-pixel-ratio: 2)", +// "#{$screen} and (-o-min-device-pixel-ratio: 2/1)", +// "#{$screen} and (min-device-pixel-ratio: 2)", +// "#{$screen} and (min-resolution: 192dpi)", +// "#{$screen} and (min-resolution: 2dppx)" +// ); + // Legacy // $small: $medium-up; // $medium: $medium-up; diff --git a/scss/foundation/components/_global.scss b/scss/foundation/components/_global.scss index ebbe448d2..7fa5ccd89 100644 --- a/scss/foundation/components/_global.scss +++ b/scss/foundation/components/_global.scss @@ -241,6 +241,15 @@ $xlarge-only: "#{$screen} and (min-width:#{lower-bound($xlarge-range)}) and (max $xxlarge-up: "#{$screen} and (min-width:#{lower-bound($xxlarge-range)})" !default; $xxlarge-only: "#{$screen} and (min-width:#{lower-bound($xxlarge-range)}) and (max-width:#{upper-bound($xxlarge-range)})" !default; +$retina: ( + "#{$screen} and (-webkit-min-device-pixel-ratio: 2)", + "#{$screen} and (min--moz-device-pixel-ratio: 2)", + "#{$screen} and (-o-min-device-pixel-ratio: 2/1)", + "#{$screen} and (min-device-pixel-ratio: 2)", + "#{$screen} and (min-resolution: 192dpi)", + "#{$screen} and (min-resolution: 2dppx)" +); + // Legacy $small: $medium-up; $medium: $medium-up;