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: | CSS | Assignee: | 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]
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Sam Sneddon [:gsnedders]
[["-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
<rdar://problem/45057755>
Sam Weinig
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 ***