Skip to content

Commit

Permalink
Add a HiDPI example media query
Browse files Browse the repository at this point in the history
`-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
  • Loading branch information
necolas committed Aug 18, 2012
1 parent 445037c commit 28f922f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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).
Expand Down
5 changes: 5 additions & 0 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 28f922f

Please sign in to comment.