Closed Bug 1914735 Opened 26 days ago Closed 14 days ago

color-scheme with different single values does not work for consecutive elements

Categories

(Core :: CSS Parsing and Computation, defect)

Firefox 131
defect

Tracking

()

RESOLVED FIXED
132 Branch
Tracking Status
firefox132 --- fixed

People

(Reporter: kizmarh, Assigned: emilio)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.5666.197 Safari/537.36

Steps to reproduce:

  1. Open https://codepen.io/kizu/pen/eYwrPXP (or open the attached .html)
  2. Look at the elements on the page.
  3. Delete or comment out the first div.

Actual results:

Before deletion of the first div, the color-scheme is applied incorrectly for the elements with the “Always dark” text: the color: CanvasText is applied, but the background and border are using the incorrect color-scheme.

After deletion/commenting out the first div it inverts: now the “Always light” is buggy.

Expected results:

The “Always light” and “Always dark” elements should have their color-scheme always correctly applied, regardless of their order.

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

Thanks for the excellent test-case Roman :)

Assignee: nobody → emilio
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4075eab1fdc4 Track color-scheme dependencies for non-inherited rule cache. r=firefox-style-system-reviewers,boris
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/47967 for changes under testing/web-platform/tests

Backed out for causing build bustages

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: error: missing documentation for a struct field
    error: could not compile style (lib) due to 1 previous error
    make[4]: *** [force-cargo-test-run] Error 101
Flags: needinfo?(emilio)
Upstream PR was closed without merging
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c30c633bc68b Track color-scheme dependencies for non-inherited rule cache. r=firefox-style-system-reviewers,boris
Status: UNCONFIRMED → RESOLVED
Closed: 14 days ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: