top | item 36786111

(no title)

WhatWorkingOn | 2 years ago

Many of the patterns Tailwind classes encourage are invalid per the CSS spec and can't be selected via javascript

discuss

order

CSSer|2 years ago

I have no idea what "invalid per the CSS spec" is supposed to mean but if you need a selector add one.

WhatWorkingOn|2 years ago

Invalid per the CSS spec is pretty self explanatory. There is a common CSS spec used by the JS engine and web browser. When the class used does not comply to that defined standard, the class is invalid.

You can see this when trying to trying to use querySelector with responsive:property-[arbitrary] classes (I think, or it might be a different pattern of which I'd have to go back and check) and other cases where the JS engine will throw an error for trying to use a class Tailwind encourages you to write.