[Webkit-unassigned] [Bug 239579] New: [css-cascade] Some legacy properties take precedence over standard ones that appear later
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Apr 20 17:37:42 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=239579
Bug ID: 239579
Summary: [css-cascade] Some legacy properties take precedence
over standard ones that appear later
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: CSS
Assignee: webkit-unassigned at lists.webkit.org
Reporter: obrufau at igalia.com
Try this code:
var s = document.body.style;
var cs = getComputedStyle(document.body);
s.cssText = "mask-clip: content-box";
cs.maskClip; // "content-box"
s.cssText = "-webkit-mask-clip: initial; mask-clip: content-box";
cs.maskClip; // "border-box"
s.cssText = "mask-composite: exclude";
cs.maskComposite; // "exclude"
s.cssText = "-webkit-mask-composite: initial; mask-composite: exclude";
cs.maskComposite; // "add"
s.cssText = "mask-mode: alpha";
cs.maskMode; // "alpha"
s.cssText = "-webkit-mask: initial; mask-mode: alpha";
cs.maskMode; // "match-source"
s.cssText = "overflow-wrap: anywhere";
cs.overflowWrap; // "anywhere"
s.cssText = "word-wrap: initial; overflow-wrap: anywhere";
cs.overflowWrap; // "normal"
s.cssText = "text-combine-upright: all";
cs.textCombineUpright; // "all"
s.cssText = "-webkit-text-combine: initial; text-combine-upright: all";
cs.textCombineUpright; // "none"
This should not happen, the legacy properties should be implemented as one of
- Aliases
- Shorthands
- Deferred properties
See https://drafts.csswg.org/css-cascade-4/#aliasing
Then the last used property would take precedence, as such:
s.cssText = "word-wrap: break-word; overflow-wrap: anywhere";
cs.wordWrap; // "anywhere" (not "break-word"!!!)
cs.overflowWrap; // "anywhere" (not "break-word"!!!)
s.cssText = "overflow-wrap: anywhere; word-wrap: break-word";
cs.wordWrap; // "break-word"
cs.overflowWrap; // "break-word"
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220421/7ba01247/attachment-0001.htm>
More information about the webkit-unassigned
mailing list