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] add test for LinkText and dark color-scheme #44940

Merged
merged 5 commits into from Mar 6, 2024

Conversation

mayank99
Copy link
Contributor

@mayank99 mayank99 commented Mar 5, 2024

Changes to system-color-consistency.html:

  1. Added a new test for LinkText.
  2. All tests are now run twice, once for color-scheme: light (default) and once for color-scheme: dark

Review with whitespace off for proper diff.


Note: I would have liked to also test for VisitedText but I'm not sure how to. <a href=""> should technically work but getComputedValue doesn't return the correct value (likely for security reasons).

@mayank99 mayank99 changed the title [color-color] add test for LinkText and dark color-scheme [css-color] add test for LinkText and dark color-scheme Mar 5, 2024
@svgeesus
Copy link
Contributor

svgeesus commented Mar 6, 2024

getComputedValue doesn't return the correct value (likely for security reasons)

Exactly for that reason, yes.

User Agents may, to mitigate privacy and security risks such as fingerprinting, elect to return fixed values for the used value of system colors which do not reflect customisation or theming choices made by the user.
https://drafts.csswg.org/css-color-4/#css-system-colors

Copy link
Contributor

@svgeesus svgeesus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks for this addition

@svgeesus svgeesus merged commit f2a043f into web-platform-tests:master Mar 6, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants