-
-
Notifications
You must be signed in to change notification settings - Fork 37
Closed
Description
Inline styles with the !important rule is weaker than other important styles.
<html>
<head>
<style>h1 { color:blue !important; }</style>
</head>
<body>
<h1 style="color:red !important;">Big Text</h1>
</body>
</html>Current output:
<html><head>
</head>
<body>
<h1 style="color: blue">Big Text</h1>
</body></html>Expected output:
<html><head>
</head>
<body>
<h1 style="color: red">Big Text</h1>
</body></html>My references:
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/important#inline_styles
... Inline important styles take precedence over all other important author styles, no matter the layer, but important styles from user's or user-agent's style sheets and transitions override them.
Screenshot from Chrome DevTools

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels