3 ms·
This is a good, comprehensive overview of the options for high-density web pages. However, I'm curious about their CSS media queries. device-pixel-
by taylorfausak 14y ago
This is a good, comprehensive overview of the options for high-density web pages. However, I'm curious about their CSS media queries.
device-pixel-ratio,
-o-device-pixel-ratio,
-moz-device-pixel-ratio,
-Webkit-device-pixel-ratio { … }
I was under the impression that you should put the vendor-prefixed versions first, followed by the unprefixed one. (Also, I don't think "-Webkit-" should be capitalized, but I don't know if it matters.) To wit:
-o-device-pixel-ratio,
-moz-device-pixel-ratio,
-webkit-device-pixel-ratio,
device-pixel-ratio { … }
- TazeTSchnitzel 14y agoI personally put normal version first, but I'm not sure it matters.
- tagawa 14y agoYes, unprefixed properties should go last. This is because CSS rules lower in a stylesheet have priority. In theory, it's possible for a browser's experimental (prefixed) implementation of a property to behave differently to its stable (unprefixed) implementation, so you'd want the stable property to supersede the experimental one, hence putting it last. As for capitalisation, it doesn't matter in a CSS stylesheet but it does matter if you work with styles in JavaScript, so it's better to keep them lowercase.