Thread: Kobo Bug thread
View Single Post
Old 03-02-2017, 09:50 AM   #847
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 80,172
Karma: 148951761
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Rev. Bob View Post
Then you have not read the EPUB spec, which imports the existing HTML and CSS specifications. That's where P gets its default margins from.
I know that ePub gets defaults from HTML but, I'm talking about the formatting. p does have defaults and for eBooks, those defaults don't work. eBooks should have a standard set of formatting rules such that the options can then be used so the user can set the eBook to look how he/she wants.

There is a difference between the defaults of HTML and the defaults of formatting. I'm talking formatting, with some HTML defaults but not all. I'd go with the default font size and the default line-height. But I would not go with the default text-indent or the default paragraph space.

Quote:
Are those "good" defaults for body text in a novel? I agree that they are not - but changing the rendering defaults is what you'd call a Really Horrifically Awful Plan.
The problem is that most reading software cannot subtract but only add. So when you have left/right margins of 1em you can only make them larger, not smaller. So yes, we need CSS to help change some of the defaults of p.

Quote:
See, the problem is that we're talking about technical specs (HTML/CSS) alongside aesthetic standards, and we really need to differentiate those for this to be a meaningful conversation. Right here, you're talking about an aesthetic point that I happen to agree with, but in such a way that it sounds like you're saying no technical standards exist - which is very, very incorrect.
Technical standards do exist. But they are not always what's wanted or needed for the job at hand. That's where CSS comes in to help chamge the standards so they are as needed.

Quote:
Um, you just did that very thing.

Saying "p defaults to no margins" makes an assertion related to the technical spec, and it is incorrect. The P element defaults to "margin: 1em 0;" - that is, one blank line above and below, with no empty space on the sides. Either you're trying to redefine the spec, or you're expressing yourself rather badly in talking about what the aesthetic standard ought to be.
I know p defaults to 1em margins and I don't think that's appropriate for eBooks.

Quote:
Your focus is so narrow that it does you a disservice here; you have apparently overlooked that the P element is used for things besides body text, and in those circumstances, the HTML defaults can work quite well.
Yes, I know p is used for other things. Sometimes not quite correctly. Header text should be using a h and not a p. Programs like Sigil use h to generate a ToC.

Quote:
Do you notice how I take care to differentiate between semantic elements of a book ("body text" or "body paragraphs" and "chapter headers") and technical elements used to render those elements ("the P element" and "Hn elements")? It's not accidental, and it gets frustrating when you haphazardly blend them together after I've taken great care to distinguish them.
Not all text is body text. So yes, you are correct here.

Quote:
Ultimately, it matters little to the reader whether an ebook achieves "no vertical margin between body paragraphs" by applying corrective CSS to P elements or by using DIV elements which default to having no vertical margins. The latter makes me cringe a bit because of the "semantic markup" aspect that's getting thrown away, but they're both valid approaches.
Personally, I find div instead of p to be poor coding even though it is correct.
JSWolf is offline   Reply With Quote