[wp-trac] [WordPress Trac] #17512: admin-bar CSS causing print problem

WordPress Trac wp-trac at lists.automattic.com
Thu May 19 17:34:14 UTC 2011


#17512: admin-bar CSS causing print problem
--------------------------+-----------------------------
 Reporter:  hartley_h     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  3.1.2
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 WP version 3.1.2

 When I print blog entries, I sometimes find that portions of the last line
 on a page are split horizontally in half, with only the top half of the
 text showing up. The lower half is discarded. Other times, a complete line
 of text is omitted between one page and the next. This is true in all
 browsers, as far as I can tell but doesn't happen on all pages and of
 course changing the margin settings in the browser affects where it shows
 up, but not the fact of it showing up.

 I traced the problem to two lines of CSS that are included in the wp-
 includes/admin-bar.php file. Specifically, if these two lines are
 commented out, the problem goes away (they are lines 311 and 312 in the
 3.1.2 version of WordPress).

 {{{
   html { margin-top: 28px !important; }
   * html body { margin-top: 28px !important; }
 }}}

 It seems like this could be fixed by modifying the line above them (line
 310, the opening style tag) to specify that this rule only apply to screen
 layout. Since the admin-bar doesn't print in any case, I don't see any
 downside to this.

 Change line 310 in wp-includes/admin-bar.php from:
 {{{
 <style type="text/css">
 }}}

 To:
 {{{
 <style type="text/css" media="screen">
 }}}

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


More information about the wp-trac mailing list