3 ms·
The has() selector definitely enhances what you can do with CSS. You can style elements differently based on what they contain.
by xigoi 3y ago
The has() selector definitely enhances what you can do with CSS. You can style elements differently based on what they contain.
- nsonha 3y agowhich is the wrong way to do it. The source of truth for a state, that determines the style, should be... well a state, most likely in memory. It should not be a visual representation of that state (what element is rendered in side). When you change the latter, your conditional css will become broken unknowingly.