elad2412/the-new-css-reset

make hidden attribute respected again

bitstarr opened this issue · 2 comments

If an element gets a hidden attribute your current main reset is resetting it to its original display property. Can be fixed with a minor addition:

*:where(:not(iframe, canvas, img, svg, video, [hidden]):not(svg *, symbol *)) {

So the hidden attribute will force display: none like the browsers default behaviour.

This is a good idea and I'm in favor.

Add this feature in a different way - updated in the last version 1.4.3

/* fix the feature of attribute hidden
display:revert; revert to element instead of attribute */
:where([hidden]){
display:none;
}