[Webkit-unassigned] [Bug 273122] Content Script CSS overriding style attributes inconsistent

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 2 09:55:09 PDT 2024


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

--- Comment #4 from Antti Koivisto <koivisto at iki.fi> ---
(In reply to Carlos J. from comment #3)
> If !important from the content script wins over style attributes with
> !important. How come styles without !important do not override style
> attributes without !important? Is this expected behaviour for user
> stylesheets?

Yes, the cascade order is (simplifying)

user agent
user
author
style attribute (author)
author !important
style attribute !important (author)
user !important
user agent !important

with the later one winning.

Not sure if treating contentScripts as user level is correct though.

-- 
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/20240502/6c379d19/attachment-0001.htm>


More information about the webkit-unassigned mailing list