Closed Bug 1862015 Opened 7 months ago Closed 6 months ago

Favicon: prefers-color-scheme is not applied in media attributes on <link> elements

Categories

(Core :: CSS Parsing and Computation, defect)

Firefox 119
defect

Tracking

()

RESOLVED DUPLICATE of bug 1790109

People

(Reporter: m, Unassigned)

Details

Attachments

(1 file)

Attached file favicon_test.zip

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.

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.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core
Component: Audio/Video: Playback → CSS Parsing and Computation

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?

Flags: needinfo?(m)

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.

Status: UNCONFIRMED → RESOLVED
Closed: 6 months ago
Duplicate of bug: 1790109
Flags: needinfo?(m)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: