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

color-contrast() page is outdated with spec, and function isn't implemented anywhere yet #36904

Open
captainbrosset opened this issue Nov 21, 2024 · 2 comments
Labels
Content:CSS Cascading Style Sheets docs needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.

Comments

@captainbrosset
Copy link
Contributor

MDN URL

https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color-contrast

What specific section or headline is this issue about?

Entire page

What information was incorrect, unhelpful, or incomplete?

Looking at the spec, the function name got renamed to contrast-color(), instead of color-contrast(), which MDN documents.
See rename decision: w3c/csswg-drafts#7557

Also, the page says that the function accepts a list of candidate colors, to pick from, but this is only defined in the color level 6 spec: https://drafts.csswg.org/css-color-6/#colorcontrast which has a banner saying "not ready for implementation".

If you look at the level 5 of the spec: https://drafts.csswg.org/css-color-5/#contrast-color, you see that the function is simpler and only accepts one color. Based on this single color, it returns a new color, which has max contrast with it.

So the entire page likely needs to be updated.

That having been said, it seems like no browser currently implement any of this. Isn't it too soon for a page on MDN?

What did you expect to see?

Either docs in line with level 5 (since level 6 discourages implementation), or no docs at all (if the function is not implemented).

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

@captainbrosset captainbrosset added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Nov 21, 2024
@github-actions github-actions bot added the Content:CSS Cascading Style Sheets docs label Nov 21, 2024
@captainbrosset
Copy link
Contributor Author

The original page was added in #3433.

@Josh-Cena
Copy link
Member

See also #24109 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:CSS Cascading Style Sheets docs needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.
Projects
None yet
Development

No branches or pull requests

2 participants