Home Digital garden Stop using active classes

Stop using active classes


Semantic/stateful/accessible selectors are really important!

I strongly recommend these articles for anyone, especially if you’re still using .is-active or similar classes for styling state.

“Style with Stateful, Semantic Selectors” by BenDMyers

“User Facing State” by Scott O’Hara on CSS-Tricks

Scott O’Hara

User Facing State | CSS-Tricks

Let’s talk about state. Communicating state to the user that is, not application stores state in JavaScript objects, or localStorage. We’re going to be

“Using CSS to Enforce Accessibility” by Adrian Roselli

Name *

Using CSS to Enforce Accessibility

The CSS3 logo as a head atop a torso with its arms folded across its chest. I am a big proponent of the First Rule of ARIA (don’t use ARIA). But ARIA brings a lot to the table that HTML does not, such as complex widgets and state information that…

“Represent State with HTML Attributes, Not Class Names” by Aleksandr Hovhannisyan