From 28f922ff3c2090d2e821c243d8be6d1de3f4eec0 Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Sat, 18 Aug 2012 18:56:42 +0100 Subject: [PATCH] Add a HiDPI example media query `-webkit-device-pixel-ratio` targets WebKit browsers. `min-resolution` targets everything else. Reference: http://www.w3.org/blog/CSS/2012/06/14/unprefix-webkit-device-pixel-ratio/ Fix gh-1127 --- CHANGELOG.md | 1 + css/main.css | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9e94986db..4f5ca9d9a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ == HEAD +* Add a HiDPI example media query (#1127). * Add bundled docs (#1154). * Add MIT license (#1139). * Separate normalize.css from the rest of the CSS (#1160). diff --git a/css/main.css b/css/main.css index 7ae155b38c..ef363f000e 100644 --- a/css/main.css +++ b/css/main.css @@ -218,6 +218,11 @@ textarea { /* Style adjustments for viewports that meet the condition */ } +@media only screen and (-webkit-min-device-pixel-ratio: 1.5), + only screen and (min-resolution: 144dpi) { + /* Style adjustments for high resolution devices */ +} + /* ========================================================================== Print styles. Inlined to avoid required HTTP connection: h5bp.com/r