[whatwg] Problems with width/height descriptors in srcset

Tab Atkins Jr. jackalmage at gmail.com
Fri May 18 07:09:12 PDT 2012


On Fri, May 18, 2012 at 2:17 AM, Markus Ernst <derernst at gmx.ch> wrote:
> <h1><img src="small.png" srcset="medium.png min-width:30em, large.png
> min-width:50em"></h1>
>
> <p><img src="small.png" srcset="medium.png min-width:30em, large.png
> min-width:50em"></p>
>
> Is em different in these 2 elements, or is it actually rem? And whatever
> answer, is it a problem or a feature?

It's the same in those two, but it's not really rem - it's the initial
font size, just like in Media Queries.  (rem is the size of an em on
the root element, which depends on style data.)

Not really a feature or a bug, just a necessity.

~TJ



More information about the whatwg mailing list