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   

Description Sam Sneddon [:gsnedders] 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).
Comment 1 Sam Sneddon [:gsnedders] 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".
Comment 2 Radar WebKit Bug Importer 2018-10-05 15:42:26 PDT
<rdar://problem/45057755>
Comment 3 Sam Weinig 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 ***