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

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners