|
|
|
|
|
by romaniv
3021 days ago
|
|
This argument doesn't stop a myriad of widely used JavaScript frameworks that rely on custom attributes. Besides, if you really care about validity, you can use <div data-my-block="my-element my-modifier">
It's still shorter, more readable and avoids repetitions. The difference becomes even more pronounced as the complexity of your styling goes up. |
|
To be fair, I don't know the latest performance figures on attribute selection.