Re:You might not need jQuery (2014)
by marlowe221 on Thursday January 14, 2021 @09:25AM
(#25776587)
As new web developer, I would LOVE to learn how to do this kind of thing purely in CSS!
Re:You might not need jQuery (2014)
by inopinatus on Friday January 15, 2021 @08:54PM
(#25799150)
My process:
* trial
* error
* reading the HTML, DOM, and CSS standards documents very thoroughly end-to-end
* stackoverflow
* repeat
Hacks with :checked are well known, but you can do a ton of stuff with :focus-within, :invalid, :target, :hover, <details>/<summary>/[open], grids/flexbox/visibility, and the adjacent-sibling selector. <dialog> is almost there, although it still needs a JS activation hook.
It feels really good to have a complete application UI that works with JS disabled, and I can still progressively enhance it with JS for necessary perversions of HTML like ARIA etc.