Live data from Hacker News

Whither print.css? A Rallying Cry for a Web That’s Fit to Print (2013)

modrenman.com

41–50 of 67 posts

Re: Whither print.css? A Rallying Cry for a Web That’s Fit to Print (2013)

#41
The poor letter-spacing, or more accurately kerning, is that either the fonts in use don't have kerning pairs or they're being ignored, as web browsers seem to do. Printing from another typeface would solve the former, but in my experience (and not thoughtful research), kerning pairs are ignored in every browser. Firefox does give an effort, though, with automatic optical kerning, but it often crashes letters together while leaving too much space between others. It would be interesting to know if that feature translated to print.

Re: Whither print.css? A Rallying Cry for a Web That’s Fit to Print (2013)

#42
post #30

Unfortunately, printed media support in CSS still sucks. I have a web app that needs to generate printable official documents, and it's really not possible to do a good job with CSS. I resort to generating PDF in Javascript, which is laborious and duplicates a lot of effort. My biggest gripe is the inability to control the header and footer and the inability to sanely specify where page breaks are allowed.

"page-break-inside: avoid" and "page-break-after" seem to work fairly reliably, as long as you aren't doing too much weird stuff with positioning, floats, etc.

Three major problems I've had with printing from HTML is 1) It seems that the different browsers have different default margins, and the outside margins aren't controllable from CSS 2) The javascript print dialog doesn't give any sort of feedback...it just blocks JS execution. There's no way to no if the user cancelled the print, etc. 3) Different browsers don't reliably resize things to fit on the page. Using percentages for anything (while maybe not recommended anyway) just doesn't work for printed CSS

Re: Whither print.css? A Rallying Cry for a Web That’s Fit to Print (2013)

#43
post #37

I've heard of people printing whole articles and reading them in paper format before. Personally, I would rather have a print.css that hides everything but a message that says "save the trees, don't print an article only to discard it after". We do have some clients that ask for their website to be printable, but it's mostly clients that are in the legal or medical business. It doesn't come in regular contracts, the…

See my comment here: https://news.ycombinator.com/item?id=7609711 I would find this message rather rude. I am interested in saving trees, but do not think technology offers me a solution yet. I print out of necessity.

Of course, this was a joke more than anything. Printing the web is fine when it is needed.

I'm talking people going to a news website, printing the article, reading it and discarding the resulting paper afterward. Unless you need to annotate or use the printed articles in some of the ways you listed, you shouldn't be printing all the articles you see.

Re: Whither print.css? A Rallying Cry for a Web That’s Fit to Print (2013)

#44
post #29
post #22

Earlier quoted context omitted.

> The premise is questionable. A webpage lives in its own medium, or it is its own medium. It is normally meant to be read with an electronic device, to be interactive and linked, though those devices can be quite different of course. The corruption of the www is something that still makes me sad and angry even though I know I lost the argument years ago. You should not know, nor care, how the reader is usin the info…

Now I feel misunderstood. I'm perfectly fine with using different devices and different presentations. But changing mediums is stronger than just changing the device or the presentation. The web has an underlying vision that can't be transported to every medium: > He [Tim Berners-Lee] kicked off by explaining what he means by the two words "semantic" and "web." Underlying the Web was the philosophy of a navigable spa…

I don't understand. Paper can't navigate but you don't need navigation. Why can't the underlying vision of everything except navigation work just as well?

Re: Whither print.css? A Rallying Cry for a Web That’s Fit to Print (2013)

#45

The idea of printing a web page (particularly an article) does seem, in many ways, pointless. As others mentioned, it's a fundamentally different medium that strips out all of the things that make a web page compelling (linking, dynamicism, etc.) On the other hand, there's clear value in stripping out the ephemera and detritus around a work in order to concentrate more centrally on the work itself. While the idea of…

Sometimes you remove the dynamicism on purpose.

Re: Whither print.css? A Rallying Cry for a Web That’s Fit to Print (2013)

#47
post #35
post #3

The premise is questionable. A webpage lives in its own medium, or it is its own medium. It is normally meant to be read with an electronic device, to be interactive and linked, though those devices can be quite different of course. But by printing a webarticle, you are transforming it into another medium, onto paper. Therefore it is actually a very strong assumption - and one I don't follow - to "expect them to supp…

>> And that even before talking about protecting the nature from wasteful habits like this. Unfortunately, reading on paper is an order-of-magnitude better than reading on the screen. I have consistently noted that: 1. I absorb the material better when reading in printed form, not sure why. 2. My eyes strain less. 3. I find three times more typos (when proof-reading my own stuff), not sure why. 4. Annotating and high…

Part of this is because most web media is awful for reading.

Column widths are standardized in print, magazine, and books for a reason: to minimize eye movement required. The larger that web screens get, the broader the column lengths often are, which forces more eye movement, which causes eye strain, which requires vision interruption, which impedes reading comprehension.

Smart phones are great for short articles because the screens are roughly the width of a newspaper column. It forces the text into an appropriate width, rather than expanding to fit the available monitor space like many websites do.

Screens also tend to cause eye strain.

Even if you do make pages responsive, chances are that the user will not realize that they should be using a skinny window or that they should shrink the text. Further, commercial web publications tend to optimize for maximized windows to display ads.

In print, we have hundreds of years of professional readability and layout experience. On the web we have some cobbled together standards. Most people who are responsible for handling web design aren't layout/typography/etc. specialists. So really basic mistakes get made all the time and few people notice them because our knowledge base has effectively eroded because there are so many other priorities to worry about on the web.

Re: Whither print.css? A Rallying Cry for a Web That’s Fit to Print (2013)

#48
There is a CSS/HTML rendering engine for print, PrinceXML http://www.princexml.com/ - it is extremely good quality. It is not open source, but does fill a niche gap. If you need to produce quality pdf output from a single source it could be worth looking at.

(its also interesting in that it is written in a functional logic programming language..., and that it is a small Australian startup)

Re: Whither print.css? A Rallying Cry for a Web That’s Fit to Print (2013)

#49
post #42
post #30

Unfortunately, printed media support in CSS still sucks. I have a web app that needs to generate printable official documents, and it's really not possible to do a good job with CSS. I resort to generating PDF in Javascript, which is laborious and duplicates a lot of effort. My biggest gripe is the inability to control the header and footer and the inability to sanely specify where page breaks are allowed.

"page-break-inside: avoid" and "page-break-after" seem to work fairly reliably, as long as you aren't doing too much weird stuff with positioning, floats, etc. Three major problems I've had with printing from HTML is 1) It seems that the different browsers have different default margins, and the outside margins aren't controllable from CSS 2) The javascript print dialog doesn't give any sort of feedback...it just blo…

[deleted]

Re: Whither print.css? A Rallying Cry for a Web That’s Fit to Print (2013)

#50

I couldn't disagree more with the author about appended URLs being a problem. A print stylesheet is exactly when you want URLs to be displayed in the text of the page, because there's no other way to find out where that underlined text is supposed to be pointing.

URLs should be displayed for sure, but inline is far too disruptive to smooth reading. I think it would be better done "reference style" if possible. Something similar to how it is done in markdown would be nice: I get 10 times more traffic from [Google][1] than from [Yahoo][2] or [MSN][3]. [1]: http://google.com/ "Google" [2]: http://search.yahoo.com/ "Yahoo Search" [3]: http://search.msn.com/ "MSN Search"

CSS3 has support for footnotes in the page module.

http://www.w3.org/TR/2011/WD-css3-gcpm-20111129/#footnotes

It adds a float: footnote; property. From reading that page, I believe this might work, once browser support catches up.

    a::after {
        float: footnote;
        content: attr(href) ' "' attr(title) '"';
    }
There are some other interesting additions:

    title { 
        display: none;
        string-set: title content();
    }
    
    @page { @top-left { content: string(title) }}
This will put the page title in the top left corner of the page margins.
Post reply on HN