-
Notifications
You must be signed in to change notification settings - Fork 27
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 Relative Color Syntax #226
Comments
See also w3c/csswg-drafts#7978 |
This seems more of a new feature rather than interop? |
@emilio |
There have been a variety of proposals which are new features, and we didn't exclude new features from being included. (And we did this last year, e.g. Cascade Layers.) |
Color functions and related features were a common response to the State of CSS 2022 question about browser incompatibilities, see #248. About 3% of responses mentioned color functions directly or indirectly, usually as "color function" or "color()", but also things like "display-p3", "LCH color" or "OKLab support". There were only 6 direct mentions of relative colors, such as "css relative colors (colors math)". This becomes difficult to untangle since we don't know how many people know that Personally, I see it as a medium-to-strong signal. |
In the MDN short survey on CSS & HTML, "CSS color spaces and functions ( |
Thank you for proposing CSS Relative Color Syntax for inclusion into Interop 2023. We wanted to let you know that this proposal was not selected to be part of Interop this year. We had many strong proposals, and could not accept them all. However this should not be taken as a comment on the technology as a whole, and resubmitting a proposal for this feature as part of a future round of Interop would be welcome. For an overview of our process, see the proposal selection summary. Thank you again for contributing to Interop 2023! Posted on behalf of the Interop team. |
Description
The relative color syntax makes it possible to manipulate the channel values of any color using any color model.
Examples
Rationale
Color theming is an important aspect of UI design, and being able to define relative colors would make this process much more streamlined and and less repetitive. Many developers already use Sass color functions to preprocess relative colors. There are also libraries such as Color.js which offers similar functionality.
In last year's State of CSS survey, "Functions for manipulating color values" scored high on "Features missing from CSS".
Specification
# relative-colors
# serial-relative-color
Tests
The text was updated successfully, but these errors were encountered: