jensimmons / cssremedy

Start your project with a remedy for the technical debt of CSS.
Mozilla Public License 2.0
2.19k stars 113 forks source link

Respect the default `hidden` attribute behaviour #72

Closed pimdewit closed 3 years ago

pimdewit commented 4 years ago

https://github.com/mozdevs/cssremedy/issues/71

This PR aims to respect the default hidden attribute behaviour.

I also tried something along the lines of

img:not([hidden]), svg:not([hidden]), video:not([hidden]), canvas:not([hidden]), audio:not([hidden]), iframe:not([hidden]), embed:not([hidden]), object:not([hidden]), article:not([hidden]), aside:not([hidden]), figcaption:not([hidden]), figure:not([hidden]), footer:not([hidden]), header:not([hidden]), hgroup:not([hidden]), main:not([hidden]), nav:not([hidden]), section:not([hidden]) { display: block; }

but I figured it would be way too bulky

kripod commented 4 years ago

That's a great idea, indeed! May I suggest using !important just to make sure it isn't overridden by e.g. display: flex on the spot?

mirisuzanne commented 3 years ago

I think there's more discussion to have around using !important, but in the meantime this does help solve a problem we've created.