Source: sebastiandedeyne.com

CSS states with attribute selectors
https://sebastiandedeyne.com/css-states-with-attribute-selectors/ https://sebastiandedeyne.com/tags/css/https://elisehe.in/2022/10/16/attribute-selectorsElise Hein compiled a few arguments in favor of using CSS attribute selectors more often. Whenever we add state we should take a step back and consider if we can leverage a standard.

However, there’s an ARIA attribute for that.

Make invalid states impossible with data attributes.

Using a data attribute enforces a single value for the attribute.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners