Skip to content

Commit

Permalink
Merge pull request #6454 from razor-x/media-queries-retina
Browse files Browse the repository at this point in the history
Add retina media query to scss.
  • Loading branch information
gakimball committed Apr 16, 2015
2 parents a53b369 + 00d878e commit 71c7a49
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doc/pages/media-queries.html
Expand Up @@ -73,6 +73,15 @@ <h4>SCSS</h4>

$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)"
);
```

<h3>Style With Sass</h3>
Expand Down
9 changes: 9 additions & 0 deletions scss/foundation/_settings.scss
Expand Up @@ -177,6 +177,15 @@ $include-html-global-classes: $include-html-classes;
// $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;
Expand Down
9 changes: 9 additions & 0 deletions scss/foundation/components/_global.scss
Expand Up @@ -324,6 +324,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;
Expand Down

0 comments on commit 71c7a49

Please sign in to comment.