abseil.github.io icon indicating copy to clipboard operation
abseil.github.io copied to clipboard

update `swe-book` HTML styling

Open vitor-mda opened this issue 3 years ago • 2 comments

Avoid adding a horizontal scrollbar when an a content is too long and body width is below a certain threshold

Before ✨ After
image image

vitor-mda avatar May 29 '22 00:05 vitor-mda

Thanks for your pull request! I'd like to add in the word wrapping on elements, but I'm unsure if we should center the text. I do want to make sure that the PDF is properly rendering on epub readers, and IIUC, a left-adjusted side margin is necessary for that.

As well, I do think centering within a wide window is less appealing/readable than adjusting left in this case. (I'd let the text float and increase the font sie, but that would also interfere with epub readers from what I understand.)

manshreck avatar Jun 09 '22 17:06 manshreck

Hey, sorry for the late response.

I thought these HTML were being used solely for browser reading, so I tried to center it like Eloquent JavaScript's (https://eloquentjavascript.net/00_intro.html) browser version, which, IMO, feels better to read (no neck turning necessary). It uses a margin: 0 auto; property on an article element for that.

But, since I'm not familiar with ePUB, I did a quick research and it seems it's best to leave the styling simpler. So, I'll leave the centering off.

vitor-mda avatar Jul 23 '22 18:07 vitor-mda