Occult knowledge of Cascading Style Sheets – named after https://youtu.be/iniwPUEbPUM
Fabio Spampinato
@fabiospampinato
You may not like it, but this is what peak CSS resetting looks like - Not using ":where" causes higher specificity. - Writing a single ":where" is way slower in Chrome.
- Writing it as a blocklist rather than an allowlist is way slower also. https://gist.github.com/fabiospampinato/1351387e445d1eb2d60075febe5f23e8…
I guess * { all: unset; display: revert;
} Would do the same job no?
– Renald Camilleri
Almost, but not exactly, for two reasons: 1. First of all you probably don't want to reset all elements, for example you might want to leave "svg" and "path" be.
Did you ever try using an at-layer for the CSS reset instead of :where? Would be interesting to see if there’s a perf difference
– Eli
I didn't. Other than resetting some elements manually, which should probably be faster because "all: unset" seems quite slow, this seems as fast as it gets.
Attention all .NET developers! Streamline your development process with ABP Commercial. ABP platform provides a powerful set of tools and features to help you start your business from day 1.
– ABP CommercialI hate it but I also love it.
– Christoph Nakazawanull
– reaperThanks I hate it
– Alberto Silva
7:19 PM · Apr 29, 2023