Opened 6 years ago
Last modified 3 years ago
#44474 new enhancement
Add print styles to backend
Reported by: | strarsis | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | has-patch |
Focuses: | css | Cc: |
Description
It would be great if lists and content can be printed from WordPress backend (admin).
Currently the whole UI is printed which wastes space, ink and clutters everything, also content fields are clipped.
A dedicated default print stylesheet for WordPress backend would use a different ink-saving, reading-friendly font, remove all unnecessary UI elements, ensure that all content fields are printed completely.
Attachments (5)
Change History (9)
This ticket was mentioned in Slack in #core-css by sabernhardt. View the logs.
4 years ago
#3
@
4 years ago
This is a great improvement! I think we can go a bit further and remove the UI elements from list pages such as posts (search form, bulk actions, pagination buttons, filter fields). Also perhaps it would be worth trying a single-column layout on the homepage, as right now the columns are still overlapping.
Also ran into a strange bug when printing Menus and Settings pages where the writing goes all weird, but it only happens on Chrome/Mac for some reason. It's not related to these changes though.
#4
@
3 years ago
I updated the patch 44474.1.patch
Hidden items in common.css:
- Toolbar (which should be hidden already for print)
- Admin side menu
- Screen Options and Help buttons (but if one is expanded, the content prints)
- Add New buttons beside the title of Posts, Media, Plugins, etc.
- Search box for filtering Posts, Comments, Users, etc.
- List table navigation container (including bulk actions and category filters)
- List table row action links
- Media Library filter toolbar (grid view)
- Media Library filter toolbar (list view)
- Admin footer
Adjustments for dashboard widgets:
- Hiding empty postbox containers
- Making each postbox more than 50% wide (I chose 60%) to avoid splitting floated elements across the page break
- Resetting the display property for the
meta-box-sortables
container toblock
(it'sflow-root
for screen)
@strarsis Thanks for the suggestion!
It's worth adding at least a few print styles to WordPress core, to remove the gray background color and hide the navigation items, etc.
I think changing the font would belong better in a plugin, though, and perhaps changing (most) colors would belong there as well.
This patch makes some basic changes for printing. I chose to give the
#wpcontent
section a rather arbitrary1em
margin on each side so content would not run to the edge of the page.