Bug 199409

Summary: background-clip:var(--a) invalidates -webkit-background-clip:text when --a:text
Product: WebKit Reporter: Jim Ratliff <jim>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal    
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Mac   
OS: macOS 10.14   
Attachments:
Description Flags
Screenshot: shows desired and actual rendering by WebKit none

Description Jim Ratliff 2019-07-02 10:36:06 PDT
Created attachment 373337 [details]
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.
Comment 1 Alexey Proskuryakov 2019-07-03 10:14:45 PDT

*** This bug has been marked as a duplicate of bug 199410 ***