[wp-trac] [WordPress Trac] #38023: Menus screen: simplify the Menu Settings controls

WordPress Trac noreply at wordpress.org
Tue Oct 25 08:14:03 UTC 2016


#38023: Menus screen: simplify the Menu Settings controls
---------------------------------------+--------------------------------
 Reporter:  afercia                    |       Owner:  rianrietveld
     Type:  defect (bug)               |      Status:  assigned
 Priority:  normal                     |   Milestone:  4.7
Component:  Menus                      |     Version:
 Severity:  normal                     |  Resolution:
 Keywords:  has-screenshots has-patch  |     Focuses:  ui, accessibility
---------------------------------------+--------------------------------

Comment (by xavortm):

 '''About the patch:'''
 Updated the selectors with generic enough names so it's not limited to the
 menu item. It's only the wrapper element that says its a menu. Having
 classes that don't specify context will allow for better reusability.


 '''About the last comment:'''
 On class names :
 .menu-item -> always a menu
 .list-item -> can be anything (same styling of course), though with a
 different modifier it can be altered. Only the wrapper specifies the type
 of the component.

 I have written an article on that topic, I can share in slack maybe.. In
 short - in my eyes it's best if the JS selectors are prefixed with .js-*
 and never targeted with css. State classes are prefixed with .is-* . Then
 there are utilities and modifiers that can be or not prefixed, depending
 on the project. Modules (components) have the name of the component on the
 wrapper element and all inner elements have class names of
 .<component>-element. Using Sass that can create one level stylings for
 most of the application. All HTML elements without most inline elements
 must have classes and no IDs.

 Again, I am diverging a lot here from the final goal, sorry about that...

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38023#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list