color-contrast() page is outdated with spec, and function isn't implemented anywhere yet #36904
Labels
Content:CSS
Cascading Style Sheets docs
needs triage
Triage needed by staff and/or partners. Automatically applied when an issue is opened.
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 ofcolor-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
The text was updated successfully, but these errors were encountered: