elad2412 / the-new-css-reset

The New Simple and Lighter CSS Reset
https://elad2412.github.io/the-new-css-reset/
MIT License
2.25k stars 229 forks source link

Issue with specificity? #62

Closed felixsanz closed 1 year ago

felixsanz commented 1 year ago

This code:

*:where(:not(html, iframe, canvas, img, svg, video, audio):not(svg *, symbol *)) {
    all: unset;
    display: revert;
}

is not only doing Remove all the styles of the "User-Agent-Stylesheet", except for the 'display' property.

Because specificity is so high you can't set, for example, word-spacing on body. Not even html body beats it. So what are the options? Isn't this an issue?

felixsanz commented 1 year ago

mmm... i think it works fine but devtools messes up. It crosses my rules and it's saying that this all: unset takes precedence, even if looks like not. It's just me?

graymatter00 commented 1 year ago

Can you provide an example. Perhaps on CodePen.

felixsanz commented 1 year ago

Can't reproduce it on isolation, so maybe an issue issue with vite, the framework, etc.

Closing!