[wp-trac] [WordPress Trac] #35206: Allow theme authors to control white space between menu items

WordPress Trac noreply at wordpress.org
Sat Dec 26 04:32:48 UTC 2015


#35206: Allow theme authors to control white space between menu items
----------------------------------------+------------------------------
 Reporter:  peterwilsoncc               |       Owner:
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Menus                       |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:  template
----------------------------------------+------------------------------
Changes (by peterwilsoncc):

 * keywords:  needs-patch => has-patch needs-unit-tests


Comment:

 In [attachment:35206.diff]:

 * as described above
 * tab indents removed in front of `<li>`s because it messes up the white-
 space if the theme author wishes to have none.

 Default markup of a menu, `wp_nav_menu` is:

 {{{
 <ul><li><a /></li>
 <li><a />
         <ul class="sub-menu"><li><a /></li>
 <li><a /></li>
 </ul>
 </li>
 </ul>
 }}}

 If the theme author specifies no white space between items, it becomes

 {{{
 <ul><li><a /></li><li><a />
         <ul class="sub-menu"><li><a /></li><li><a /></li>
 </ul></li>
 </ul>
 }}}

 `wp_page_menu` defaults to the white space free version.

 This will need unit tests. I will need help and advice writing them. :)

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


More information about the wp-trac mailing list