DEV Community

Discussion on: Create an accessible dropdown navigation

 
link2twenty profile image
Andrew Bone

It was more for people that might read later 😜

Thread Thread
 
lkopacz profile image
Lindsey Kopacz

Yeah, I definitely understand the avoiding JS by default mindset. For me, I usually think this way too. My rule of thumb is always to use JS to toggle classes and use CSS to change the styling vs control the styling in JS. Over the years though, I've been less resistant to use JS depending on circumstance so long as I'm writing it in a minimalistic style.

I'll play around more with :focus-within for my follow up post :).