From ad45e73c47017499fa2466635b6dc9748e23a728 Mon Sep 17 00:00:00 2001 From: Hans Christian Reinl Date: Tue, 7 Apr 2015 14:10:13 +0200 Subject: [PATCH] Update high resolution media query This commit adds a the dppx variant of min-resolution to add an easier to use value for the media query. `dppx` is not supported by all browsers and needs the `dpi` fallblack. `dppx` is more acurate than `dpi` since dots per inch refers to a defined size of pixels wher one inch is 96px what so ever and does not take physical inches into account. Autoprefixer will include `-webkit-min-device-pixel-ratio` which is needed for Safari and WebKit devices. Reference #1474. --- CHANGELOG.md | 3 +++ dist/css/main.css | 1 + src/css/main.css | 1 + 3 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd6f6c04c3..39e179476a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +* Update high resolution media query + ([#1474](https://github.com/h5bp/html5-boilerplate/issues/1474)) + ### 5.1.0 (April 1, 2015) * Update Normalize.css to `v3.0.3`. diff --git a/dist/css/main.css b/dist/css/main.css index 8dcdea29d1..c9370463bc 100644 --- a/dist/css/main.css +++ b/dist/css/main.css @@ -197,6 +197,7 @@ textarea { @media print, (-webkit-min-device-pixel-ratio: 1.25), + (min-resolution: 1.25dppx), (min-resolution: 120dpi) { /* Style adjustments for high resolution devices */ } diff --git a/src/css/main.css b/src/css/main.css index da11003b43..3c995a6eb1 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -189,6 +189,7 @@ textarea { } @media print, + (min-resolution: 1.25dppx), (min-resolution: 120dpi) { /* Style adjustments for high resolution devices */ }