Bug 187052

Summary: initial keyword doesn't match initial -webkit-mask-box-image-slice and stroke-color values
Product: WebKit Reporter: Sam Sneddon [:gsnedders] <gsnedders>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: sam, simon.fraser, webkit-bug-importer, youennf, zalan
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   

Sam Sneddon [:gsnedders]
Reported 2018-06-26 10:31:10 PDT
Compare computed styles of <span style="all: initial; direction: initial; unicode-bidi: initial; display: inline;"> and <span>: -webkit-mask-box-image-slice: 0 (all: initial) v. 0 fill stroke-color: rgb(0, 0, 0) (all: initial) v. rgba(0, 0, 0, 0) This is unexpected, the semantics of all: initial should make the computed styles of both identical. wpt/infrastructure/assumptions/html-elements.html tests this (see "Compare CSS span definitions (only valid if pre-reqs pass)" test).
Attachments
Sam Sneddon [:gsnedders]
Comment 1 2018-06-26 10:54:14 PDT
[["-webkit-mask-box-image-slice", "0 fill"], ["stroke-color", "rgba(0, 0, 0, 0)"]].forEach(([property, initial]) => { ["", "initial", "inherit"].forEach((value) => { test(() => { const el = document.createElement("span"); document.body.appendChild(el); el.style[property] = value; const cs = window.getComputedStyle(el); assert_equals(cs[property], initial); }, property + ": " + value); }); }); shows this is actually just the initial keyword generally? Neither property has any defined value in html.css, so I don't know why there's any difference here. Note that mask-border-slice, which per Compat -webkit-mask-box-image-slice is an alias of, should per spec have an initial value of 0 (as it gets with the initial keyword!) rather than the current "0 fill".
Radar WebKit Bug Importer
Comment 2 2018-10-05 15:42:26 PDT
Sam Weinig
Comment 3 2020-07-21 14:42:39 PDT
This was fixed in r263156. Sorry for not seeing this bug when I was fixing it (and therefore the forward dupe here). *** This bug has been marked as a duplicate of bug 213171 ***
Note You need to log in before you can comment on or make changes to this bug.