Save the planet with CSS!

I’ve been quiet lately (big updates on the horizon) so a quick one for this evening:

My pre-launch checklist for website builds has always include “create print.css”. Most of the time I forget (or ignore it). It seems like the default thing to do though. Until you think about it.

Who prints web pages?

I do sometimes. Invoices, receipts, tickets etc. But general content pages? It’s 2011! We carry around smartphones with all sorts of apps to access and store information. One of my favourite campaigns last year was Save as WWF — the PDF that can’t be printed, and that got me thinking.

Here’s my new print.css:

@media only print
{
	body * { display: none !important; }
	body:after { content: "Don't waste paper!"; }
}

I’ll be using something similar on my personal projects (where printing makes no sense). It doesn’t make my content any less accessible, and it’s easy to bypass if you’re really, really set on printing.

In truth though, it’s probably wise to really consider what can be printed. A lot of paper can be saved with a carefully crafted print.css.

What do you think? Maybe I should start a campaign?

Update!

I did it: see printstylesheet.com and join the revolution!

Follow the discussion over at Forrst

5 Comments

Radu

Count me in! Tree huggers FTW!!!

Michael

I can’t say I’m too impressed with the WWF on this one. The site barely works without JavaScript, and they don’t offer the software for Linux. It seems more like a feel good meaningless gesture. Also, a quick perusal of the “Terms of Use” suggest that it isn’t Free Software, as they don’t like it being used for “pornographic content or other purposes likely to corrupt minors”. I don’t even know what corruption of minors means, but I bet when I was one I would have thought it fun. If you read the license agreement which pops up when you install the software (MS Windows version, running in WINE), you’ll note it also forbids using the software to distribute or promote “blasphemous” content. I guess I won’t be using the software to save my rant about how the Norse Gods are all a bunch of not nice folks… (and don’t get me started on the Roman Gods).

Unfortunately I couldn’t finish the install. I also can’t see an example file to download and see whether or not the format works on my computer as intended. I suspect not. All the PDF readers on Linux based systems I’ve used seem to ignore any Digital Restrictions Management settings. Which is what this is of course. It’s feel good DRM, using a feature built into the PDF standard.

It wouldn’t surprise me if the software was based on actual Free Software, probably Ghostscript. In which case there is an even bigger reason to be upset, as they certainly aren’t following the license if it’s GPL.

A quick search of the ‘net later reveals that I’m not the only one to have come up with many of these said same criticisms. Indeed, http://sourceforge.net/mailarchive/message.php?msg_id=26744588 suggests that I was correct about the software being based on Free Software (though not GPL based).

If this was just a campaign to draw attention to the amount of stuff being printed, and aim to reduce that amount, then I would understand. But it’s more than that. It encourages bad things (e.g. DRM), and also suggests that people need to be forced not to print, because otherwise they are just going to print everything. People aren’t that stupid.

In conclusion, the WWF should really take down the site, or at a minimum make the software properly Free Software (Free as in Freedom) and remove all the rubbish related to how the software can be used. I will be communicating this to the WWF as well.

Postscript: I’ve read that apparently this was done by WWF Germany, not the WWF International, which makes me feel slightly better.

—–

All the above said, having a print style sheet that hides everything is something different. Though, there is still that hint of, “you don’t need to print this, and if you think you do, I know better than you”.

I personally use the print version of pages to save to my computer. Rather than saving a page with an interesting article (or whatever) with all the ads, navigation, JS tracking, etc., I try and save just the content. A print version of the page makes that easier (different to a print style sheet, I know).

I notice David that you say you will be including this new print style sheet, “where printing makes no sense”. Yet, you’ve included it on your About page. Perhaps I want to print out that page to take to a lunch I’m having in the city to show someone all the places you’ve done work for. I’d only print the first page or two, because I do care about the environment (I also use recycled paper). (Not that I’m actually in Britain, but as an example.)

You’ve also got the style sheet on pages such as your aptly named blog post “Hey, I was reading that…”. Well, I was going to but …

Well, OK, in reality I rarely print web pages (in the past, a long time ago, I didn’t have Internet access at home, at that time I did print much more). If I do, it’s a reference that I want to be able to refer to often. I’m also technically capable enough to disable CSS (I love my “Web Developer” toolbar!).

David Bushell

Hey Michael, thanks for the insightful comment!

To be honest I posted this as a bit of fun and haven’t really considering all the pros & cons yet. You’ve highlighted some very good examples of when printing can be useful.

I felt like I had to include it in my CSS just on the of chance someone would check ;) I’m not sure it will remain.

Michael

Heh, I’m a nerd, of course I’m going to check. And as I said, to be honest I print very little now. When I do, it’s normally something that I want to show someone else. On most pages I’m not ever going to notice if there’s a print style sheet or not.

Your Comment…

Comments are now closed, give me a shout on Twitter @dbushell!