Closed Bug 1265071 Opened 9 years ago Closed 9 years ago

"-webkit-background-clip: border" is rejected by CSS parser (but accepted in Chrome & Safari)

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
firefox48 --- affected

People

(Reporter: dholbert, Unassigned)

References

Details

Attachments

(2 files)

STR: 1. Load attached testcase. 2. (optional) Check browser console. (Ctrl Shift J) EXPECTED RESULTS: Text should be visible. (Background is clipped to text) ACTUAL RESULTS: Text is not visible (i.e. background is not clipped to text). Also, this appears in browser console: >Error in parsing value for '-webkit-background-clip'. Declaration dropped. So, it looks like this is purely a parsing error. My testcase here is reduced from the WebKit blog post about this feature: https://webkit.org/blog/164/background-clip-text/ I'm not sure how common this comma-separated style is on the web, but given that it was used in the announcement blog post, I'm expecting some of the web must depend on it.
Sorry, I should have included in my STR: 0. Set about:config pref layout.css.background-clip-text.enabled to true.
Sorry, turns out this has nothing to do with "text" -- it's just that "border" is an invalid value for this property. "border-box" is the correct value. If I tweak the testcase to use "border-box", it works correctly. So, I'm going to resolve this as INVALID and I'll file bugs on WebKit/Blink to remove their stale "border" value. If it turns out there's web content (beyond this one blog post) that depends on us supporting this value, we can reconsider adding it as a value that aliases "border-box".
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
Attachment #8741926 - Attachment description: testcase 1 → testcase 1, with broken CSS ("border" as a value) -- nonetheless, Chrome accepts it
Attachment #8741931 - Attachment description: testcase 1 with fixed CSS (s/border/border-box/) -- works correctly in Firefox → testcase 2, with fixed CSS (s/border/border-box/) -- works correctly in both Chrome & Firefox
Summary: "-webkit-background-clip: text, border" is rejected by CSS parser → "-webkit-background-clip: border" is rejected by CSS parser
Summary: "-webkit-background-clip: border" is rejected by CSS parser → "-webkit-background-clip: border" is rejected by CSS parser (but accepted in Chrome & Safari)
Depends on: 1265154
No longer depends on: 1265154
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: