Print Styling, the 3 Basics
Published on AprĀ 5, 2019 (updated FebĀ 5, 2024), filed under development, css, design (feed). (Share this on Mastodon orĀ Bluesky?)
Running start. Pretty much every website should have a usable print view.
Why? Because users still print, of course, especially when sitesāand also appsācontain useful content (like professional articles) or important information (as with confirmations or invoices). Users may even need to print at times, for reasons we should leave them to judge. On top of that the print dialog is also used to save information in electronic form, and thus printing does not necessarily equate eco-terrorism.
What does this mean? My view. (There are others.)
1. Have a Print Style Sheet, and Be It a Negative One
A ānegativeā print style sheet means to explicitly cater only for non-print media, and not do anything for print but rely on appropriate HTML to be displayed according to user agents defaults. (This approach is a dead simple classic.) A āpositiveā print style sheet, then, does of course refer to style rules for print, applied through the print
media type.
2. Hide Whatās Not Usable or Usefulāand Be Subtle Otherwise
In positive print style sheets, itās usually the first step, and a most convenient one at that, to hide (display: none
) everything thatās not usable or useful on printing or saving. This usually doesnāt include branding (site logo) but instead navigation options (header, footer) and forms, as well as supplementary and embedded information that may be useful in hypertext context but not in printāthink in-article teasers for related articles or galleries, or sidebar elements that provide auxiliary but not critical information. (Mileage may vary here as it seems neither important nor possible to come up with strict definitions on what must and must not be shown in print.)
For hyperlinksāI canāt think of little else āhypertextualā this would apply toāuse rather subtle, if any, cues to indicate their presence. Links donāt work on paper, and so they donāt need the prominence they need on interactive displays. In most cases this doesnāt only mean not to expand links to be appended by the URLs they point to (this is, with few exceptions, a long deprecated practice for it disrupts reading), but also to use a text color thatās more like the regular copy, and much toned-down underlining (borrowing from the school of Edward Tufte).
3. Test and Tweak
Thereās a great number of sites and apps where print styling has been dismissed or plainly been forgotten. Donāt dismiss, nor forget. Test for a reasonable print experience, and, finally, consider:
Print styling is easy, especially in its negative variant. The larger our interest in a good user experience, however, the higher the demand to make sure print doesnāt only work but that itās also pleasant. As that sort of pleasure stems from good design, when we want nicely designed print styling, we are beyond basic rules and quick tips but need to invest time in optimizing further and, perhaps, planning for print styling.
ā§ Pretty much every website should have a usable print view.
This post had several working titles, with anything from three to five basics to ground rules. Iāve decided to keep it simple, to merge the rules down to form three groups, and to speak of ābasicsā rather than ārules.ā Iām convinced we need to keep print in mind. And that itās easy.
About Me
Iām Jens (long: Jens Oliver Meiert), and Iām a web developer, manager, and author. Iāve been working as a technical lead and engineering manager for companies youāve never heard of and companies you use every day, Iām an occasional contributor to web standards (like HTML, CSS, WCAG), and I write and review books for OāReilly and Frontend Dogma.
I love trying things, not only in web development and engineering management, but also in other areas like philosophy. Here on meiert.com I share some of my experiences and views. (I value you being critical, interpreting charitably, and giving feedback.)