[wp-trac] [WordPress Trac] #21752: Dropdown for "Show all dates" should have a flexible width

WordPress Trac wp-trac at lists.automattic.com
Fri Aug 31 14:03:52 UTC 2012


#21752: Dropdown for "Show all dates" should have a flexible width
-------------------------+-----------------------------
 Reporter:  tar.gz       |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  UI           |    Version:  3.4.1
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 In the admin interface, when we have a list view of posts, such as in /wp-
 admin/edit.php, there is a dropdown menu with the string "Show all dates".
 This dropdown menu has a fixed width of 155 pixels, defined by the
 following CSS rule:

 /wp-admin/css/wp-admin.dev.css (lines 822 – 824):

 {{{
 .tablenav select[name="m"] {
 width: 155px;
 }
 }}}

 This fixed width is problematic for languages where the string is longer,
 such as in French ("Afficher toutes les dates"). Here, 155px is just
 slightly too short, and the final "s" is missing. It would look better if
 the width would be flexible, like this:

 {{{
 .tablenav select[name="m"] {
 width: auto;
 }
 }}}

 This change is also beneficial for english users, since the interface
 becomes more compact, no wasted space!

 If we want to set a hard limit for languages where the string could be
 extremely long, in order not to break the interface, we could set a max-
 width value, maybe 200px. So the final code would be:

 {{{
 .tablenav select[name="m"] {
 width: auto;
 max-width: 200px;
 }
 }}}

 PS: max-width is supported by IE7 and newer:
 http://caniuse.com/#feat=minmaxwh

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21752>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list