-
Notifications
You must be signed in to change notification settings - Fork 22.8k
css(add): contrast-color() function page #39847
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
Conversation
Preview URLs
External URLs (3)URL:
(comment last updated: 2025-06-12 02:12:11) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised they went with this design, because there are a lot of designs that don't use plain-white or black text.
They are waiting for the contrast algorithm to get better. There are numerous complaints about it. After that, it'll be easy to expand to more than black and white colors. @Josh-Cena In the article, they say TP, but the version is not mentioned. The latest TP version should have the feature, right? Edit: Josh confirmed it works in TP Safari. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @OnkarRuikar! I've made some comments for you to look over.
files/en-us/web/css/css_values_and_units/css_value_functions/index.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Chris Mills <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OnkarRuikar a few more comments for you, but we're very close now!
Co-authored-by: Chris Mills <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @OnkarRuikar; I think this is ready to merge now.
* css(add): contrast-color() function page * Apply suggestions from code review * remove livesample markers * add color picker to the example * add prefers-color-scheme example * Apply suggestions from code review Co-authored-by: Chris Mills <[email protected]> * move extra content to the description section * Apply suggestions from code review Co-authored-by: Chris Mills <[email protected]> --------- Co-authored-by: Joshua Chen <[email protected]> Co-authored-by: Chris Mills <[email protected]>
Description
Add contrast-color() function page.
Motivation
The feature is in Safari Technology Preview now.
Additional details
The function is completely different now from the original
color-contrast()
function. The current version is simple, accepting only one parameter and returning only two possible values.Related issues and pull requests