[whatwg] So if media-queries aren't for determining the media to be used what are they for?
mail at matthewwilcox.com
Wed May 16 01:33:05 PDT 2012
Am i right in believing that the srcset attribute are limited to
pixels? A unit that's dying out in all responsive designs? Is it
extensible to em, % etc? Because that's what's used.
On 16 May 2012 08:39, Chris Heilmann <codepo8 at gmail.com> wrote:
> On 16/05/2012 00:23, Kornel Lesiński wrote:
>> On Tue, 15 May 2012 23:17:54 +0100, Chris Heilmann <codepo8 at gmail.com>
>>> 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">
>> <source media="(min-device-pixel-ratio: 2)" src="hidpi">
>> <img src="lowdpi">
>> 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.
> Now there is a massive list of assumptions. People were happy for YEARS to
> do a:
> <object width="420" height="315"><param name="movie"
> name="allowFullScreen" value="true"></param><param name="allowscriptaccess"
> type="application/x-shockwave-flash" width="420" height="315"
> allowscriptaccess="always" allowfullscreen="true"></embed></object>
> For a video. You know why? Because it worked! SVG didn't work inside HTML
> for a long time that's why these gradients didn't work - not because it was
> too long. HTML5 Doctype may be loved but people even forget using that one
> (case in point - codecademy HTML classes totally forget about it - WHEN
> teaching new people how to write code for the web).
> Tooling works around these issues, not making a language shorter. You learn
> that when you teach people to start using the web. Let's not get too excited
> about what the people writing specs use and like but see what makes a
> platform that is understandable and works.
More information about the whatwg