[Webkit-unassigned] [Bug 221873] New: Add experimental support for CSS Color 5 color transformations

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Feb 13 19:54:28 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=221873

            Bug ID: 221873
           Summary: Add experimental support for CSS Color 5 color
                    transformations
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: sam at webkit.org

Now that we have adequate support for static color types and CSS Color 4, we should look at adding experimental support for the color transformation functions and syntax of CSS Color 5 - https://drafts.csswg.org/css-color-5/.

>From doing an initial look, I have spotted a few initial things that we will need to consider:

- How should we handle transformations of color keywords that are currently not resolved until something like colorFromPrimitiveValue is called? The most basic example would be doing something like `color-mix(lch currentColor 40%, red)`. My hunch is we will want to create a new CSSValue type to store these pending-colors (perhaps limited only to the cases we can't do them eagerly).

- How can we inject constants into the environment for calc()? For the relative color syntax, the spec seems to want injection of named constants into css calc() functions. For instance, one example includes the following:

    `color: hsl(from var(--accent) calc(h+180) s l);`

In this example, the "h" should be numeric value of the hue channel of var(--accent) converted to HSL. We will have to see what the best way to model this in the current CSS calc infrastructure is.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210214/04acf65a/attachment.htm>


More information about the webkit-unassigned mailing list