Forum Bugs

another weird css formatting issue - all html not displayed

nineohnine
I am sure that this may be just due to how twitter styles their pages, but I am including an example to see if this is something that should be handled for. The example html file saved from twitter when creating the pdf, cuts off some of the html items (not all the list items / tweets are displayed).

Source included along with the example output and custom css.

This is the command line to produce the output: prince -s twitter.css 1.tweets.html.edited.html -o tweets.pdf --javascript --media=screen
  1. 1.tweets.html.edited.html289.0 kB
  2. tweets.pdf407.0 kB
  3. twitter.css0.8 kB
hallvord
Hi nineohnine, this is also a problem that has to do with the CSS display property. A simplified explanation is that Twitter styles some of their columns with "inline-block" - to make them behave more like inline elements and line up next to each other, it's a CSS hack that enables grid-like layout techniques. However, Prince takes the "inline" part of that a bit too seriously and tries very hard to keep all the lines of this "inline" together without pagination. When that "inline" element is in fact a very long list of tweets, we have a problem.

A hack to work around it is for example
.Grid-cell{display: block !important;}

in your helper stylesheet.

Announcement: repos for tests/utils