[wp-trac] [WordPress Trac] #35107: wp_nav_menu outputs tags without line breaks in 4.4, causes strange bug with justified text

WordPress Trac noreply at wordpress.org
Wed Dec 16 15:49:46 UTC 2015


#35107: wp_nav_menu outputs tags without line breaks in 4.4, causes strange bug
with justified text
--------------------------+------------------------------
 Reporter:  wp-architect  |       Owner:  obenland
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Menus         |     Version:  4.4
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  template
--------------------------+------------------------------

Comment (by DoodleDogCody):

 Would like to add to this with code example of why this is a problem.  On
 a number of mys sites I do the following


 {{{
 .nav-primary ul.menu-primary {
     text-align: justify;
 }
 .nav-primary ul.menu-primary::after {
     content: " ";
     display: inline-block;
     width: 100%;
 }
 }}}

 This has the effect of evenly spacing the nav menu items within their
 container. This only works when there is space between the <li> tags
 because justify only works if there are multiple words or in this case
 elements for it to justify.

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


More information about the wp-trac mailing list