Quote:
Originally Posted by paperwhite13
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
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.