-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Auto-sizes: parsing of auto in sizes is bogus #9649
Copy link
Copy link
Closed
Labels
Description
I noticed that https://html.spec.whatwg.org/multipage/images.html#parsing-a-sizes-attribute doesn't seem to do what I intended it to do, if there are items after auto:
sizes="auto, 200px"
Step 3.3 here says to return size i.e. the auto keyword. Steps 5 and 6, which translates auto to a length, is not reached, so it's undefined what it means.
Also, if there is a media condition before auto:
sizes="(min-width: 0) auto, 200px"
Then step 3.5 does not return, and also doesn't abort the loop, so the loop continues with the next /unparsed size/ and then returns 200px.
Reactions are currently unavailable