[wp-trac] [WordPress Trac] #14891: Fix line-height of admin CSS for .updated and .error messages

WordPress Trac wp-trac at lists.automattic.com
Fri Sep 17 20:50:17 UTC 2010


#14891: Fix line-height of admin CSS for .updated and .error messages
----------------------------+-----------------------------------------------
 Reporter:  joelhardi       |       Owner:                 
     Type:  defect (bug)    |      Status:  new            
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Administration  |     Version:  3.1            
 Severity:  minor           |    Keywords:  css            
----------------------------+-----------------------------------------------
 This is just a one-line fix to {{{wp-admin/css/global.dev.css}}}. Either
 bug or enhancement depending on how you rate
 typography/design/readability.

 In 3.0.1 and trunk, the line-height property for error messages is set to
 1. These are the pink- and yellow-background messages such as "Settings
 saved" that are displayed to the user.

 The bug is that with line-height set to 1, the leading/line spacing == the
 font size, so these look horrible when the message wraps more than one
 line in the browser. The lines of type overlap each other, so it's hard to
 read. My guess would be that the design tester just wasn't looking at
 multi-line error messages, or it would have been caught earlier. Short,
 single-line messages such as "Settings saved." look fine.

 To see one, call {{{add_settings_error('some', 'text', 'some text that's
 long enough to wrap more than one line in the browser')}}} on some admin
 page.

 I've attached a patch with suggested fix to change this property from 1
 (i.e. == 100%) to 125%. An alternate fix that I'd be happy with would be
 to just delete the property (so that line-height would revert to being the
 same as other <p> elements on the page). As long as line-height is set to
 some reasonable default value so that I don't have to hardcode style rules
 into my plugins any more, I will be happy!

 More info: The computed font size of {{{.updated p, .error p}}} in the
 browser is 12px. So, my suggestion of 125% equals leading of 15px. This is
 slightly narrower than the line spacing of the other <p> elements on the
 admin page and I believe fits the designer's presumed original intent of
 compressing the line spacing slightly for these error messages. But again,
 I would also agree with just deleting the "line-height" property for this
 style declaration, so that the line spacing for these messages is the same
 as for other <p>s on the admin pages, and is obviously simpler to just not
 modify the default line-height at all.

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


More information about the wp-trac mailing list