Make WordPress Core

Opened 6 years ago

Last modified 3 years ago

#44474 new enhancement

Add print styles to backend

Reported by: strarsis's profile 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)

44474.patch (578 bytes) - added by sabernhardt 4 years ago.
Screen Shot 2020-04-03 at 3.35.38 pm.png (174.5 KB) - added by isabel_brison 4 years ago.
UI elements can be removed from list pages.
Screen Shot 2020-04-03 at 2.42.13 pm.png (234.6 KB) - added by isabel_brison 4 years ago.
Dashboard columns overlapping
Screen Shot 2020-04-03 at 3.21.55 pm.png (181.0 KB) - added by isabel_brison 4 years ago.
Menus page
44474.1.patch (1.2 KB) - added by sabernhardt 3 years ago.
hiding more elements and revising dashboard widgets layout for print

Download all attachments as: .zip

Change History (9)

#1 @sabernhardt
4 years ago

  • Focuses css added
  • Keywords has-patch added
  • Version 4.9.6 deleted

@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 arbitrary 1em margin on each side so content would not run to the edge of the page.

@sabernhardt
4 years ago

This ticket was mentioned in Slack in #core-css by sabernhardt. View the logs.


4 years ago

#3 @isabel_brison
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.

@isabel_brison
4 years ago

UI elements can be removed from list pages.

@isabel_brison
4 years ago

Dashboard columns overlapping

@sabernhardt
3 years ago

hiding more elements and revising dashboard widgets layout for print

#4 @sabernhardt
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 to block (it's flow-root for screen)
Note: See TracTickets for help on using tickets.