Favicon: prefers-color-scheme is not applied in media attributes on <link> elements
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
People
(Reporter: m, Unassigned)
Details
Attachments
(1 file)
5.83 KB,
application/zip
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0
Steps to reproduce:
I made a website with two <link> tags, one with a media attribute set to "(prefers-color-scheme: dark)" and a dark mode favicon, and another with a media attribute "(prefers-color-scheme: light)" with a normal favicon.
Actual results:
Firefox applied the value of the last <link> tag irrespective of the system's color scheme preference.
Expected results:
Firefox should have applied the favicon aimed for the dark or light color scheme regardless of order in the page.
Comment 1•7 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Reporter | ||
Updated•7 months ago
|
Comment 2•7 months ago
|
||
Can you tell whether any other media types/queries work in <link>
tags -- is it just prefers-color-scheme
that fails, or is the media
attribute completely broken/unsupported there?
Comment 3•6 months ago
|
||
This is known, but FWIW prefers-color-scheme
in <link rel="favicon">
feels wrong, because the preferred color-scheme of the website might not match the Firefox theme. The right thing to do is handling prefers-color-scheme
inside the icon. That allows us to (and we currently do) match the Firefox theme properly.
Description
•