Closed Bug 1722031 Opened 2 years ago Closed 2 years ago

Ship accent-color


(Core :: CSS Parsing and Computation, task)




92 Branch
Tracking Status
firefox92 --- fixed


(Reporter: emilio, Assigned: emilio)


(Blocks 1 open bug)


(Keywords: dev-doc-complete)


(3 files, 1 obsolete file)

No description provided.

The accent-color computation right now chooses between black and white,
which is not ideal.

I tried to make it so that authors could choose the foreground colors in
the linked CSSWG issue from the comment, but that didn't go anywhere.

I think choosing a contrasting color that is in-line and contrasting
enough with the accent-color chosen by the page when darkening is better
than just black or white.

If we want the black-or-white behavior we can just change to something large enough. is a nice playground to see this patch
in action.

Depends on D120722

Attachment #9232849 - Attachment is obsolete: true

No other property returns currentcolor in the computed style, and
Chrome agrees with us on this test.

Pushed by
Fix an accent-color test. r=mstange
Pushed by
Fix RelativeLuminanceUtils::Adjust to not choke on blacks / zero components. r=mstange
Tweak accent-color foreground computation and let it ride the trains. r=mstange
Created web-platform-tests PR for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot

I've updated BCD and release notes:

No longer blocks: css-ui-3
You need to log in before you can comment on or make changes to this bug.