Skip to content

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

@Crissov

Description

@Crissov

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions