[wp-trac] [WordPress Trac] #40686: CSS: introduce naming and usage conventions for JS targeting

WordPress Trac noreply at wordpress.org
Sun May 7 13:34:51 UTC 2017


#40686: CSS: introduce naming and usage conventions for JS targeting
----------------------------+-----------------------------
 Reporter:  afercia         |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:
 Severity:  normal          |   Keywords:
  Focuses:  ui              |
----------------------------+-----------------------------
 As part of the broader goal of the
 [https://make.wordpress.org/core/2014/12/19/core-css-roadmap/ CSS
 roadmap], it would be great to start introducing CSS classes naming and
 usage conventions for JS targeting.

 This need clearly emerged during the ongoing exploration to revamp the
 Settings API, and woud benefit all the codebase. Work on the Settings API
 is happening on GitHub and [https://github.com/wpaccessibility/settings-
 api-enhanced/issues/11 there's an open issue for this].

 Quoting from the doc @helen prepared to share some thoughts (the doc is
 available on the GitHub issue):
 > Reusing styling class names is fragile and obscures intent when doing
 long-term maintenance.

 Personally, I can only add that I can't count the number of times when
 touching some CSS class or ID forced me to check all the codebase to make
 sure they weren't used also for JavaScript related purposes :)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40686>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list