I used `:has` and `:checked` to create conditional styles, no JS required.

Blog post at https://goulet.dev/posts/conditional-styles-with-has/

#csstip #webdev

Conditional Styles with CSS `:has()`

A simple example of conditional styling with :has and :checked pseudo-class, no JS needed.

goulet.dev