View Single Post
Old 02-02-2024, 03:44 PM   #64
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 36,242
Karma: 145735536
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by paperwhite13 View Post
I guess this is something I still don’t understand. Why not use the bare (L.E.: styled) h1 for the normal chapter, and h1.specialchapter for the rest? Why is there a need for a h1.normalchapter?
This a a matter of personal preference. I tend to prefer using classes for most items since it makes it easier when I go back to make changes to know what to change and keeps me from having to override other settings.

Quote:
Originally Posted by paperwhite13 View Post
This is also something I don’t understand yet, sorry Especially the 'why bother restricting' part. Do you mean you could reuse the class for the other headings?
Yes, you can. Since I like headers centered, bold and with spacing above and below, I do have a h1...h6 class for that. I then add font size, styling, etc. in separate classes much as in @turtle91's example above. When I find myself with multiple classes removing bits from the base class, it's time to look at the base class.

One horrible example was an ebook I was looking at where the base paragraph class includes font-style: italic; and almost every paragraph style added font-style: normal;. It was a lot simpler to remove the italic styling and add it to the few paragraphs styles that did not have font-style: normal;.

Again, this is my personal preference. Most people have them though, unlike certain posters, they don't seem to regard them as if they had been brought down from the mountain top engraved on stone tablets.

I like to use h1 for volumes, h2 for parts inside a volume and h3 for chapters inside the parts which is just my personal preference. I find it makes it easy for me to create nested ToCs but there are other ways of reaching the same end.

If someone uses different preferences and the ebook still renders properly, more power to them. I'll look at their stylesheets and see if there is anything in them that I want to file the serial numbers off of and add them to my toolbox.
DNSB is offline   Reply With Quote