Skip to content

[css-color-4] [css-ui-4] computed value of accent-color: AccentColor #14193

Open

Description

@tuankiet65

#5900 (comment) resolves that AccentColor should return the color set by accent-color, if one exists.

Given that, what's the computed value of accent-color: AccentColor?

Prior art: @LeaVerou proposes that it should resolve to AccentColor of the parent element here:

<lea> Proposed resolution: accentcolor and accentcolortext resolve relative to the accent-color property.
accent-color: accentColor resolves relative to the parent.

Activity

  1. LeaVerou commented on Jul 17, 2026

    @LeaVerou
    Member

    In fact, I think we should establish this as a CSS design principle: Any unit, keyword, or other value that resolves relative to the computed value of a certain property should resolve to the value of the parent when used on the property itself.

    That’s how currentColor works, that's how em and friends work, and I wish that's how var() worked — we'd have way fewer cases for inherit().

  2. moved this from Agenda+ FTF to Thursday Morning in CSSWG summer 2026 meeting agendaon Aug 1, 2026
  3. css-meeting-bot commented on Aug 6, 2026

    @css-meeting-bot
    Member

    The CSS Working Group just discussed [css-color-4] [css-ui-4] computed value of `accent-color: AccentColor` , and agreed to the following:

    • RESOLVED: accentcolor/accentcolortext resolve at computed value time
    The full IRC log of that discussion <TabAtkins> tuankiet65: in my impl it resolves accentcolor during computed value
    <TabAtkins> tuankiet65: that has some complication... some things have to be done in order
    <TabAtkins> tuankiet65: accent-color first, then color, then all other color properties
    <TabAtkins> tuankiet65: which is a bit annoyhing
    <TabAtkins> emilio: that's how color-scheme works too,
    <TabAtkins> fantasai: so ordering is color-scheme, accent-color, color, others
    <TabAtkins> TabAtkins: and same as the ordering needed for font-size, line-height
    <fantasai> fantasai: but that is the opposite of the cycle break we just resolved on?
    <tuankiet65> Sorry, I need to check what's the order that I implemented
    <TabAtkins> fantasai: what's the more useful use-case?
    <TabAtkins> emilio: color:accentcolor is more important than accent-color:currentcolor
    <TabAtkins> fantasai: yes, so therefore we need to swap the previous resolution
    <TabAtkins> emilio: yes, color:accentcolor should bea ble to look at the actual accent-color of the element
    <TabAtkins> fantasai: so accent-color:currentcolor looks at the parent
    <TabAtkins> emilio: no it's fine. it computes to itself
    <TabAtkins> emilio: accent-color:currentcolor; color:accentcolor;
    <TabAtkins> emilio: in that case, at computed time, accent-color remains currentcolor keyword. color look at accent-color, so effectively you're doing color:currentcolor, so you'll get the color of your parent
    <TabAtkins> fantasai: so we need to go back and change the resolution a bit
    <TabAtkins> PROPOSED: accentcolor/accentcolortext resolve at computed value time
    <fantasai> +1
    <tuankiet65> +1
    <emilio> +1
    <ChrisL> +1
    <ntim> PROPOSED: color: AccentColor; resolves to the current accent-color
    <TabAtkins> RESOLVED: accentcolor/accentcolortext resolve at computed value time
  4. fantasai commented on Aug 6, 2026

    @fantasai
    Collaborator

    See also discussion in #14192

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions