update `swe-book` HTML styling
Avoid adding a horizontal scrollbar when an a content is too long and body width is below a certain threshold
| Before | ✨ After |
|---|---|
![]() |
![]() |
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.)
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.

