2 ms·
I get along without classes just fine, if I have an edge case I usually don't need a class but rather need to target an attribute or pseudo class. If a textare
by phillipseamore 1y ago
I get along without classes just fine, if I have an edge case I usually don't need a class but rather need to target an attribute or pseudo class.
If a textarea is disabled there's no need to add a class.
textarea {background:red;}
textarea[disabled] {background:gray;}
Could also be generalized as:
[disabled] {background:gray;}
or forms specifically:
[disabled]:is(textarea, input, select, button) {background:gray;}