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-color-4] Does CSS Color normatively require that HTML elements use/match system-colors in the UA stylesheet? #7781

Closed
weinig opened this issue Sep 22, 2022 · 2 comments
Labels
Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered. css-color-4 Current Work

Comments

@weinig
Copy link

weinig commented Sep 22, 2022

The WPT test css/css-color/system-color-consistency.html seems to require that the UA stylesheet use (or at least match at computed value time) the system-colors defined in CSS Color 4.

      test_computed_value('color', 'ButtonBorder', style.getPropertyValue('border-color'), 'resolves to the same color as the border-color of a ' + element.name);

I can't tell if this is a real requirement of the spec, or just something that the spec is suggesting. If it is a real requirement, it would be helpful if the spec was updated to explicitly specify which HTML elements and properties this applies to.

@svgeesus
Copy link
Contributor

For systems that do not have a particular system UI concept, the specified value should be mapped to the most closely related system color value that exists

I think that makes it hard to test, and te descriptions are deliberately vague and non-prescriptive. The actual WPT is fairly conservative, like testing for the color of the canvas.

I think this makes more sense to test together with forced color mode, tbh.

@fantasai fantasai added the css-color-4 Current Work label Nov 16, 2022
@svgeesus
Copy link
Contributor

To answer the specific question as asked: I think that WPT is poor because "most closely related value" is not testable. The spec is giving guidance, not making a hard requirement.

Closing as question answered and no change to the spec, but feel free to point to this issue as justification when deleting or trimming down that test.

@svgeesus svgeesus added the Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered. label Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered. css-color-4 Current Work
Projects
None yet
Development

No branches or pull requests

3 participants