View Single Post
Old 07-17-2022, 03:20 PM   #1
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 781
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Sage
What's Going on with this Class/Style?

Can someone explain the point of the following class/style?
Code:
.element-container-single.element-type-also-by .heading .title-subtitle-block, .element-container-single.element-type-also-by .heading .title-subtitle-block .title-block, .element-container-single.element-type-also-by .heading .title-subtitle-block .element-number-block, .element-container-single.element-type-about-author .heading .title-subtitle-block, .element-container-single.element-type-about-author .heading .title-subtitle-block .title-block, .element-container-single.element-type-about-author .heading .title-subtitle-block .element-number-block {
  padding-top: 0;
}
Maybe I'm misunderstanding how these are supposed to work. But, I thought the various names (separated by commas) before the curly brackets were different ways of referring to the same formatting. So, if I'm reading that correctly, there are 6 different ginormous names for the same trivial bit of formatting (padding-top: 0). Why do that instead of just making a class called something like "notoppad"? Is it because w3c wants people to use semantically named classes instead of structural names?

In the current book I'm trying to reformat, I looks at a file that contains a couple of lines of simple text and the underlying formatting for it is a full page of wall-o-text. I can't figure out what the page is doing because all the formatting codes burn my eyes out and short-circuit my brain.
enuddleyarbl is offline   Reply With Quote