Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-ui] Make accent-color accept foreground and background value #11180

Open
Crissov opened this issue Nov 12, 2024 · 1 comment
Open

[css-ui] Make accent-color accept foreground and background value #11180

Crissov opened this issue Nov 12, 2024 · 1 comment
Labels
css-ui-4 Current Work

Comments

@Crissov
Copy link
Contributor

Crissov commented Nov 12, 2024

https://drafts.csswg.org/css-ui-4/#propdef-accent-color

Arguably, color should have been a shorthand property to set two longhand properites, i.e. background-color and a hypothetic text-color or foreground-color (reflected in the currentcolor dynamic value, related to fill-color and stroke-color). I thought this was recorded in the list of mistakes but it is not.

Can we make accent-color accept a second, optional <color> value to override both, AccentColor (mostly background) and AccentColorText (foreground), from System Colors?
Not being able to set both may lead to insufficient contrast for UA-defined accent text on a author-defined accent background.

PS: Original issue was #5900, see its resolution:

AccentColor takes its value from accent-color, and AccentColorText takes its value from the appropriately contrasting foreground color for AccentColor;

@Crissov Crissov changed the title Make accent-coloraccept foreground and background value [css-ui] Make accent-coloraccept foreground and background value Nov 12, 2024
@bleper
Copy link

bleper commented Nov 12, 2024

Note: text-color and foreground-color already the thing. And there is no progress on the similar proposal to add a keyword in #5292 (if the spec changes currentcolor it won't be very web compatible), instead inherit() will cover this possibility.

@fantasai fantasai added the css-ui-4 Current Work label Nov 12, 2024
@Crissov Crissov changed the title [css-ui] Make accent-coloraccept foreground and background value [css-ui] Make accent-color accept foreground and background value Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-ui-4 Current Work
Projects
None yet
Development

No branches or pull requests

3 participants