Representing UI state in HTML using data attributes is more flexible and scalable than using classes. It allows for explicit and debuggable representation of state, and avoids problems with conflicting styles.
Sort: