Re: [csswg-drafts] [mediaqueries] Effect of <meta name=color-scheme> on img and video sources (#13377)

> Both are difficult to solve because the HTML parser makes an immediate request for an image as soon as it identifies an image URL. When it encounters source elements in the picture element, it can only select a source using the information it has at parse time.

So there's (at least) two possible solutions to this that works with any of the options you mention, the parser could just pick both image sources... then render the correct one once it's got information?

Alternatively, the HTML parser could make a best attempt at loading the right image based on the pages used color scheme, then when it gets to rendering if it realises actually this doesn't work (the subtree has a different color scheme) it can swap out for another source. This does potentially lead to double loads BUT at least its not unconditional double loads.

-- 
GitHub Notification of comment by lukewarlow
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13377#issuecomment-3804563696 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 27 January 2026 11:12:44 UTC