[whatwg] So if media-queries aren't for determining the media to be used what are they for?

Kornel Lesiński kornel at geekhood.net
Tue May 15 16:23:22 PDT 2012


On Tue, 15 May 2012 23:17:54 +0100, Chris Heilmann <codepo8 at gmail.com>  
wrote:

> The fetish for brevity is something I never understood. More  
> understandable code is faster to write than cryptic short code.

There is significant difference in verbosity for a *very common case* of  
serving images for high-dpi ("Retina") display (which I suspect is only  
going to get more common):

<img src="lowdpi" srcset="hidpi 2x">

vs

<picture>
<source media="(min-device-pixel-ratio: 2)" src="hidpi">
<img src="lowdpi">
</picture>


It will get tiring when it'll have to be used for every image on the page.

Authors couldn't be bothered to type extra markup for all vendor's  
prefixes in CSS. Nobody bothered with verbose SVG gradient syntax which  
was usable before CSS gradients. HTML5 DOCTYPE is loved. Brevity matters.

-- 
regards, Kornel Lesiński



More information about the whatwg mailing list