View Single Post
Old 01-31-2024, 12:52 PM   #19
nabsltd
Fanatic
nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.
 
Posts: 528
Karma: 9529956
Join Date: Aug 2013
Location: Hamden, CT
Device: Kindle Paperwhite (11th gen), Scribe, Kindle 4 Touch
Quote:
Originally Posted by Turtle91 View Post
A 'normal paragraph' is what makes up 98.7% of a chapter. Why have <p class="normal-paragraph"> when it is easier just to have that as a naked tag <p>?? When cleaning up a book's code, that is what I consider 'low hanging fruit', easy to fix, and makes a big improvement in readability.
The problem with this is that for any class you assign to a p element, you need to explicitly override every property that you set for the default. For example, since most people like some sort of indent on the general paragraphs, that means you have to remember to override that with an explicit text-indent: 0;. This can be easy to not notice if the "special" paragraph is centered.

My take is that "bare" elements should have all properties set to the default value as defined by the CSS standard. In other words, a normal "CSS reset".

I have seen EPUBs styled with a "bare" div being set as essentially a block quote:
Code:
div {
  margin-left: 2em;
  margin-right: 2em;
  margin-top: 1em;
  margin-bottom: 1em;
  font-size: 0.9em;
}
This is not a good default for something that is just supposed to be a container that can be styled. Nesting quickly results in an unreadable font size.
nabsltd is offline   Reply With Quote