The Anti-Reset (to Reset to User Agent Styles)
Published on August 17, 2020 (ā» December 14, 2021), filed under Development (RSS feed for allĀ categories).
I advise against resets. You donāt need them. (We donāt need them.) I think theyāre dying. (The reset detection extension barely registers anymore, though that also has other reasons.)
I advise against resets even though, vanity note, Iāve been one of the ones to come up with and promote them. That was in 2004, but Iāve never gone beyond that āuniversal reset.ā
Whatās the opposite of that universal reset? Of all resets? The anti-reset. You can write it yourself. It looks something like this, with force but not without flaws (I was impatient and am not sure I included just the needed pseudo-classes, and then thereās incomplete support at least for revert
):
*,
::after,
::before,
::first-letter,
::first-line,
::selection,
:active,
:checked,
:disabled,
:enabled,
:focus,
:hover,
:indeterminate,
:target,
:visited {
all: revert !important;
}
Hereās the gist. Hereās the bookmarklet. Hereās a test page. Firefox, yes, may offer best support. Chrome does not.
I advise against anti-resets š That makes no sense now. But the reset of a reset is not no reset. Itās two resets. But thatās not the same as 0 Ć 0, itās more like 1 + 1, when really you want 0, because you already have 1 (style sheet), and no more, old school, and so you donāt want 1 + 1 + 1 but 1 + 0, or 1 + 0 + 0, and that is just getting a bit very complicated now.
I advise against resets. I advise against anti-resets. You donāt need them. (Unless you do. Do whatever you deem appropriate.) See you around.
About Me
Iām Jens (long: Jens Oliver Meiert), and Iām a frontend engineering leader and tech author/publisher. Iāve worked as a technical lead for companies like Google and as an engineering manager for companies like Miro, Iām a contributor to several web standards, and I write and review books for OāReilly and FrontendĀ Dogma.
I love trying things, not only in web development (and engineering management), but also in other areas like philosophy. Here on meiert.com I share some of my experiences and views. (Please be critical, interpret charitably, and giveĀ feedback.)
Read More
Maybe of interest to you,Ā too:
- Next: Website Optimization Measures, Part X
- Previous: Caring About Comments
- More under Development
- More from 2020
- Most popular posts
Looking for a way to comment? Comments have been disabled,Ā unfortunately.
Get a good look at web development? Try WebGlossary.infoāand The Web Development Glossary 3K. With explanations and definitions for thousands of terms of web development, web design, and related fields, building on Wikipedia as well as MDN Web Docs. Available at Apple Books, Kobo, Google Play Books, andĀ Leanpub.