Closed Bug 1838175 Opened 11 months ago Closed 11 months ago

Media queries are ignored for `link` elements with `rel=icon`

Categories

(Firefox :: Tabbed Browser, defect)

Firefox 114
Desktop
All
defect

Tracking

()

RESOLVED DUPLICATE of bug 1790109
Tracking Status
firefox114 --- affected
firefox115 --- affected
firefox116 --- affected

People

(Reporter: johshoff, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/114.0

Steps to reproduce:

  1. Load the attached test case in Firefox
  2. Make the window less than 600px wide

Actual results:

Observe that the shortcut icon in the tab is white.

Expected results:

The shortcut icon should be black since that matches the media query

media="(max-width: 600px)"

Instead it just picks the last rel=icon link, even though the media query does not match.

Other notes:

  • Same behavior regardless of what the width is when loading the page.
  • Same behavior with other media queries, like prefers-color-scheme
  • I get the expected results with media queries rel=stylesheet
  • I observe the expected results in Chrome 114.0.5735.106 on Mac
  • I observe the same results as Firefox with Safari 16.4 (18615.1.26.110.1) on Mac, so maybe this isn't a bug? It is surprising that it works for rel=stylesheet and not rel=icon, though.

The Bugbug bot thinks this bug should belong to the 'Core::CSS Parsing and Computation' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core

Icon loading is handled in the front-end. We could support this easily to some extent, I believe.

Component: CSS Parsing and Computation → General
Product: Core → Firefox

Hello, thank you for the bug report!
Managed to reproduce this on:

  • Nightly 116.0a1;
  • Firefox 115.0b5;
  • Firefox 114.0.1;

Tested and reproduced on:

  • macOS 12;
  • Windows 10;
  • Ubuntu 22;

Setting as NEW.

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → All
Hardware: Unspecified → Desktop
Component: General → Tabbed Browser
Status: NEW → RESOLVED
Closed: 11 months ago
Duplicate of bug: 1790109
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: