Open Bug 1951206 Opened 25 days ago Updated 16 days ago

CSS relative colors not working with math functions

Categories

(Core :: CSS Parsing and Computation, defect, P3)

Firefox 135
defect

Tracking

()

People

(Reporter: hazdiego, Assigned: tlouw)

References

(Blocks 1 open bug)

Details

Steps to reproduce:

Visit https://jsbin.com/fadonasapu/edit?html,output

Actual results:

Text is black

Expected results:

Text should be green

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

So this is because parse_number_argument tries to eagerly resolve the arguments to numbers, which isn't doable for colors generally.

In order to fix this we'd need to propagate them further in the calc tree, much like we do for e.g. hypot() here.

Tiaan, do you have cycles to look at this? Seems it should be straight-forward.

Blocks: css-color-5
Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(tlouw)
Priority: -- → P3

This came up in color-4 implementation as well and was not super trivial back then, but after the relative color refactors, it might be, will have to investigate this again.

Flags: needinfo?(tlouw)
Assignee: nobody → tlouw
You need to log in before you can comment on or make changes to this bug.