4 ms·
As a former freelance book compositor, I can say there are typically many more details that go into laying out a book. To take this layout up a notch, I would w
by cardamomo 4y ago
As a former freelance book compositor, I can say there are typically many more details that go into laying out a book. To take this layout up a notch,
I would want to create a baseline grid (set the line heights and paragraph margins to align text of different sizes). I would also want to control widows and orphans, which is built into CSS.
- snoopen 4y agoDoes CSS support baseline grids? Since pagination isn't really a thing in CSS in guessing not?
- cardamomo 4y agoNot to my knowledge. Here's a write-up from 2012 that still seems to be accurate today. https://www.smashingmagazine.com/2012/12/css-baseline-the-good-the-bad-and-the-ugly/ https://www.smashingmagazine.com/2012/12/css-baseline-the-go...
- stasmo 4y agoPagination really is a thing in CSS, it’s just a part of the spec that’s not well supported by browsers right now. Use pagedjs to polyfill the missing spec features and you can control how content is split up between pages, add content to page margins, add blank pages and solve all sorts of print-related problems with CSS only.
- yojo 4y agoGood point. My goal was definitely just getting to an output that satisfied me as a reader, but there are certainly people out there with more refined aesthetic sensibilities that are going to spot the places I fell down. The part that seemed hardest to get just right with CSS was text justification. I can specify inter-word justification, but there are cases where getting the spacing just right is impossible without breaking a long word using a hyphen. As far as I can tell, there's no programmatic way to do this with just CSS. I addressed widows and orphans in my ePub layout, but for some reason forgot it in the print layout (d'oh). The nice thing about print on demand is it's easy to make updates, which I will. So thanks for pointing that one out! I'll also read up on using a baseline grid, I suspect CSS will work fine for that, since my content is all text with little variation between sizes.
- cardamomo 4y agoI also suspect you'll find a simple CSS solution to establishing a baseline grid! Good luck!