Use System colors for links - #12761
Open
TimvdLippe wants to merge 2 commits into
Open
Conversation
[`/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.
lukewarlow
reviewed
Aug 6, 2026
:link
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/css/css-color/system-color-consistency.htmlensuresthat system colors and the resolved
colorproperties 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 )