[Webkit-unassigned] [Bug 156641] New: Safari incorrectly accepts invalid values for -webkit-background-clip (content, padding, & border); should require "-box" suffix

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 15 13:50:47 PDT 2016


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

            Bug ID: 156641
           Summary: Safari incorrectly accepts invalid values for
                    -webkit-background-clip (content, padding, & border);
                    should require "-box" suffix
    Classification: Unclassified
           Product: WebKit
           Version: Safari 9
          Hardware: Unspecified
                OS: OS X 10.11
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: dholbert at mozilla.com

Created attachment 276505
  --> https://bugs.webkit.org/attachment.cgi?id=276505&action=review
testcase 1

What steps will reproduce the problem?
(1) Visit https://jsfiddle.net/d557kky5/ or load attached testcase.

What is the expected output?
No red should be visible. (The inner element's background should not be clipped.)

What do you see instead?
Red is visible. (The inner element's background *is* clipped.)


NOTES:
This bug indicates that Safari is incorrectly accepting "-webkit-background-clip:content" as valid CSS.  It should not -- "content" is not a valid value for the "background-clip" property.  The correct value is "content-box" (note the "-box" suffix).

The same thing happens for "border"/"border-box" & "padding"/"padding-box".  (Safari accepts the former values -- missing the "-box" suffix -- in the -webkit-background-clip alias, but it should not.)

More details on this property here:
 https://drafts.csswg.org/css-backgrounds-3/#the-background-clip
 Value:    <box> [ , <box> ]*
 <box> = border-box | padding-box | content-box

I ran into this because Mozilla is implementing support for "-webkit-background-clip" as an alias in Firefox Nightly (and Edge has done the same), and I ran across an ancient WebKit blogpost[1] which did not work in Firefox Nightly or in Edge 13, but which does work in Chrome & Safari.  Turns out it's because it relies on one of these old keyword values ("border"). 

If there's a web-compatibility need to keep these "-box" suffixless aliases around, please let me know, and maybe we'll have to consider adding support for them.  But otherwise, please get rid of them for the sake of interoperability. Thanks!

[1] https://webkit.org/blog/164/background-clip-text/

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160415/bc6b4dc3/attachment.html>


More information about the webkit-unassigned mailing list