Opened 14 years ago
Closed 14 years ago
#17512 closed defect (bug) (fixed)
admin-bar CSS causing print problem
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.2 | Priority: | normal |
Severity: | normal | Version: | 3.1.2 |
Component: | Administration | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
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">
Attachments (1)
Change History (7)
#4
follow-up:
↓ 5
@
14 years ago
- Keywords commit added
Anyone see an issue with screen being used as an implied implied "not print"? While there are other media types, I don't think we should have an issue -- but just checking.
We could also override our own CSS in the style media="print"
that does the actual hiding of the admin bar.
#5
in reply to:
↑ 4
@
14 years ago
Replying to nacin:
Anyone see an issue with screen being used as an implied implied "not print"? While there are other media types, I don't think we should have an issue -- but just checking.
We could also override our own CSS in the
style media="print"
that does the actual hiding of the admin bar.
I think the patch on this ticket is probably the best solution.
Yeah.