tabvengers / spicy-sections

Creative Commons Zero v1.0 Universal
128 stars 10 forks source link

One possible take on issue #11 #16

Closed bkardell closed 2 years ago

bkardell commented 2 years ago

I really feel like there are probably opportunites to improve the code as a whole, but I think this is one possible take on issue #11

If anyone wants to 'try it out' running, I have updated it into https://spicy-sections.glitch.me/SpicySections.js

davatron5000 commented 2 years ago

I took this for a spin and I think we're going to need !important on the .hide class.

https://codepen.io/davatron5000/pen/JjJBLOE?editors=1000

If I define style on a tab panel, the :where(spicy-sections > .hide) selector isn't powerful enough to override my CSS.