You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main goal should be establishing a solid convention for naming CSS classes or ID attributes meant to be exclusively used for JS targeting. Quoting from Helen's doc"
Reusing styling class names is fragile and obscures intent when doing long-term maintenance.
The text was updated successfully, but these errors were encountered:
js- prefixed classes is certainly the right way for multiple elements in my opinion, and I'm also slowly changing my mind that even more distinct cases using a JS-specific class instead of the ID makes sense. :)
What should the structure of the class names be like? Can we specify patterns like js-{element} (for general functionality, such as making every element with that class a datepicker for example) and js-{context}-{action} (for more specify things)? Those are only very basic examples, I'm generally wondering whether we can even come up with such a flexible pattern set or whether we need to decide that per use-case.
Splitting this out from #6
See also discussion on Slack during Settings API meeting:
https://wordpress.slack.com/archives/C02RQBWTW/p1493049728130607
The main goal should be establishing a solid convention for naming CSS classes or ID attributes meant to be exclusively used for JS targeting. Quoting from Helen's doc"
The text was updated successfully, but these errors were encountered: