[Webkit-unassigned] [Bug 199409] New: background-clip:var(--a) invalidates -webkit-background-clip:text when --a:text

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 2 10:36:06 PDT 2019


            Bug ID: 199409
           Summary: background-clip:var(--a) invalidates
                    -webkit-background-clip:text when --a:text
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Macintosh
                OS: macOS 10.14
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jim at jim-ratliff.name

Created attachment 373337

  --> https://bugs.webkit.org/attachment.cgi?id=373337&action=review

Screenshot: shows desired and actual rendering by WebKit

See http://dabblet.com/gist/062ef5b3cef1557ed994aae73ee6ff8a for reduced test case.

This problem occurs when `background-clip` is set to `text` using a CSS variable. It causes WebKit to ignore a valid `-webkit-background-clip:text` and instead reverts to `background-clip:border-box`.

Note that the following works fine (renders background through clipped text):
  -webkit-background-clip: text;
  background-clip: text;

But the following does not work (computes `background-clip:border-box` rather than `background-clip:text`) in WebKit, Safari, and Chrome (but works fine in Firefox):
  --a: text;  */
  -webkit-background-clip: text;
  background-clip: var(--a);

Apparently, WebKit finds `background-clip: var(--a);` invalid at computed-value time (even though it is equivalent to `background-clip:text`, which works fine) and causes WebKit to throw out the preceding `-webkit-background-clip: text;` statement.

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/20190702/24d2ea2f/attachment.html>

More information about the webkit-unassigned mailing list