-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disabled CSS test using all: revert !important
#20
Comments
all: initial !important
all: initial !important
all: initial !important
all: revert !important
I've good results with this selector: :not(#ch4 > #co2),
:not(#ch4 > #co2)::before,
:not(#ch4 > #co2)::after,
:not(#ch4 > #co2)::marker {
all: revert !important;
}
Tested with this article from CSS Tricks where ordered lists use Also tested with this snippet where specificity is (1, 0, 1+) <p id="id1">lorem ipsum</p>
<style>
p#id1 { background: hotpink !important; }
p#id1::before {
content: '::BEFORE' !important;
color: white !important;
background-color: darkblue !important;
background: red !important; /* shorthand property */
}
</style> |
Just FORGET about this lesser selector 😝
/* UnCSS */
@layer debug {
*,
::before,
::after,
::marker {
all: revert !important;
}
} Hadn't read anything about this feature yet because I hadn't any use case for front end dev stuff (I'm not writing a CSS framework) but with accessibility in mind, I do have a dozen of use cases! 😸 And regrets I didn't read about it sooner ^^ The only possible improvement to this UnCSS snippet is making sure the <!-- ... -->
<title>Page title</title>
<style>@layer over9000;</style>
<!-- ... -->
<style>@layer over9000 { * { property: value !important; } }</style>
</body>
</html> has more specificity than anything else. Related: hope postcss-safe-important still works |
Where could this stand:
Related to ffoodd/a11y.css#344 #17 #16
FWIW, inspiration from Miriam Suzanne on Twitter — and it all started with a joke :D
Here's the code to try:
The text was updated successfully, but these errors were encountered: