Closed Bug 2049616 Opened 19 days ago Closed 5 days ago

Style query fails if custom property is set with contrast-color

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox154 --- fixed

People

(Reporter: jakea, Assigned: emilio)

Details

Attachments

(2 files)

https://output.jsbin.com/yorexud/quiet - background should be green.

@property --contrast-color {
  syntax: "<color>";
  initial-value: white;
  inherits: true;
}

:root {
  --contrast-color: contrast-color(#000);
}

@container style(--contrast-color: white) {
  body {
    background: green;
  }
}

The getComputedStyle on --contrast-color is correct, but the style query isn't working.

The severity field is not set for this bug.
:jfkthame, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jfkthame)
Attached file Reduced test-case.

The root cause is that we don't simplify contrast-color at computed-value time even though we can.

I'll land a reftest based on the codepen, but I gotta run now.

Assignee: nobody → emilio
Status: NEW → ASSIGNED
Flags: needinfo?(jfkthame)

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/61128 for changes under testing/web-platform/tests

Status: ASSIGNED → RESOLVED
Closed: 5 days ago
Resolution: --- → FIXED
Target Milestone: --- → 154 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

Created:
Updated:
Size: