Skip to content

Use System colors for links - #12761

Open
TimvdLippe wants to merge 2 commits into
whatwg:mainfrom
TimvdLippe:link-text-system-color
Open

Use System colors for links#12761
TimvdLippe wants to merge 2 commits into
whatwg:mainfrom
TimvdLippe:link-text-system-color

Conversation

@TimvdLippe

@TimvdLippe TimvdLippe commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

/css/css-color/system-color-consistency.html ensures
that system colors and the resolved color properties have the same value. When updating Servo to support dark mode, using the specified value for links isn't necessarily compatible in dark or light mode.

In other parts of the specification, the system colors are used to denote
the values, leaving it up to user agents to determine what the value should be. In fact, Edge currently fails this test and chooses a different value for LinkText in light mode. In dark mode, Edge passes the test.

Therefore, to align with user agent choice and ensure that system
colors are consistent with resolved colors, use system colors for links.

(See WHATWG Working Mode: Changes for more details.)


/rendering.html ( diff )

[`/css/css-color/system-color-consistency.html`](https://wpt.fyi/results/css/css-color/system-color-consistency.html?label=experimental&label=master&aligned) ensures
that system colors and the resolved `color` properties have the same
value. When updating Servo to support dark mode, using the specified
value for links isn't necessarily compatible in dark or light mode.

In other parts of the specification, the system colors are used to denote
the values, leaving it up to user agents to determine what the value
should be. In fact, Edge currently fails this test and chooses a different
value for LinkText in light mode. In dark mode, Edge passes the test.

Therefore, to align with user agent choice and ensure that system
colors are consistent with resolved colors, use LinkText for links.
Comment thread source Outdated
@TimvdLippe TimvdLippe changed the title Use LinkText as color for :link Use System colors for links Aug 7, 2026
TimvdLippe added a commit to TimvdLippe/servo that referenced this pull request Aug 7, 2026
This both updates Stylo to respect the dark/light mode color
scheme flags, as well as enable the `color-scheme` CSS property.

In doing so, it uncovered inconsistencies in the user agent
styling, which required updating to use the system colors. If
we want to change the color values, we need to update Stylo
instead which specifies the chosen color values.

This also uncovered an issue with the HTML spec where link
elements don't necessarily use the LinkText system color [1].

Testing: newly passing WPT tests

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>

[1]: whatwg/html#12761
TimvdLippe added a commit to TimvdLippe/servo that referenced this pull request Aug 7, 2026
This both updates Stylo to respect the dark/light mode color
scheme flags, as well as enable the `color-scheme` CSS property.

In doing so, it uncovered inconsistencies in the user agent
styling, which required updating to use the system colors. If
we want to change the color values, we need to update Stylo
instead which specifies the chosen color values.

This also uncovered an issue with the HTML spec where link
elements don't necessarily use the LinkText system color [1].

Testing: newly passing WPT tests

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>

[1]: whatwg/html#12761
TimvdLippe added a commit to TimvdLippe/servo that referenced this pull request Aug 7, 2026
This both updates Stylo to respect the dark/light mode color
scheme flags, as well as enable the `color-scheme` CSS property.

In doing so, it uncovered inconsistencies in the user agent
styling, which required updating to use the system colors. If
we want to change the color values, we need to update Stylo
instead which specifies the chosen color values.

This also uncovered an issue with the HTML spec where link
elements don't necessarily use the LinkText system color [1].

Testing: newly passing WPT tests

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>

[1]: whatwg/html#12761
TimvdLippe added a commit to TimvdLippe/servo that referenced this pull request Aug 7, 2026
This both updates Stylo to respect the dark/light mode color
scheme flags, as well as enable the `color-scheme` CSS property.

In doing so, it uncovered inconsistencies in the user agent
styling, which required updating to use the system colors. If
we want to change the color values, we need to update Stylo
instead which specifies the chosen color values.

This also uncovered an issue with the HTML spec where link
elements don't necessarily use the LinkText system color [1].

Testing: newly passing WPT tests

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>

[1]: whatwg/html#12761
TimvdLippe added a commit to TimvdLippe/servo that referenced this pull request Aug 7, 2026
This both updates Stylo to respect the dark/light mode color
scheme flags, as well as enable the `color-scheme` CSS property.

In doing so, it uncovered inconsistencies in the user agent
styling, which required updating to use the system colors. If
we want to change the color values, we need to update Stylo
instead which specifies the chosen color values.

This also uncovered an issue with the HTML spec where link
elements don't necessarily use the LinkText system color [1].

Testing: newly passing WPT tests

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>

[1]: whatwg/html#12761
pull Bot pushed a commit to Haofei/servo that referenced this pull request Aug 9, 2026
)

This both updates Stylo to respect the dark/light mode color scheme
flags, as well as enable the `color-scheme` CSS property.

In doing so, it uncovered inconsistencies in the user agent styling,
which required updating to use the system colors. If we want to change
the color values, we need to update Stylo instead which specifies the
chosen color values.

This also uncovered an issue with the HTML spec where link elements
don't necessarily use the LinkText system color [1].

Stylo PR: servo/stylo#438

Testing: newly passing WPT tests

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>

[1]: whatwg/html#12761
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants