View Single Post
Old 08-30-2012, 03:26 AM   #8
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,555
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by travger View Post
Especially as they are all like that (this is most common in-the-middle-of-chapter paragraph):

.p1 {
display: block;
font-family: Times;
font-size: 0.70588em;
font-style: normal;
font-variant: normal;
font-weight: normal;
line-height: 1.2;
margin-bottom: 2px;
margin-left: 0;
margin-right: 0;
margin-top: 0;
text-align: justify;
text-indent: 1.25%
}

I started to dabble with html only little time ago, so please forgive if it's trivial question.

Why must every paragraph be block?
Font-family - doesn't reader have it's own settings? I personally prefer uniform font in the books I read (Can't have Times ).
Same for size.
Style, variant, weight - won't they be reader's settings?
line-height - again reader's default?
margin-bottom: 2px - I'm not sure if mobi recognizes it
margin-left - reader's settings?
margin-right - reader's settings?
text-align: justify - reader's settings?
Note that the style is for ".p1", that is, everything with class="p1", not just paragraphs. When deciding what to remove and what to leave there, you must take into account inheritance and usage.

For example, "display: block" is pretty useless if class="p1" is only applied to <p> tags, since paragraphs are already block-level by default, but if there's a <span class="p1">, it may be needed. "font-style: normal" is probably useless too... but maybe the generic "p" style (which would apply to all <p> tags, with or without class) is defined with "font-style: italic", or maybe <p class="p1"> paragraphs are used inside a <div> defined as italic...

Then there are some things that should not be hard-coded, but left to the reader to choose, like font family and size, justification, etc.[/quote]

Quote:
I would delete most and leave it like that:

.p1 {
margin-bottom: 2px;
margin-top: 0;
text-indent: 1.25%
}
If that's the normal vanilla text paragraph, that's OK. But mixing vertical spacing and indent is not a very good idea, and I'd prefer a larger indent (1-1.5 em). What's more, if you plan is converting this to mobi, just remove it, leave is as default (even for ePub that would be best, if the reading application allows setting default styles).
Jellby is offline   Reply With Quote