View Single Post
Old 05-17-2020, 09:06 PM   #1
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Question on naming classes

I've seen some style sheets with classes based on usage in the book and some with classes defining the format

Other than possibly personal style, are there any recommendations, advantages, or disadvantages to the two approaches?

Code:
h1.book-title {
  margin-top: 10%;
  page-break-after: avoid;
  text-align: center;
  margin-bottom: 2em;
}
h2.book-subtitle {
  page-break-after: avoid;
  text-align: center;
  margin-bottom: 1em;
}
h2.book-author {
  page-break-after: avoid;
  text-align: center;
  margin-bottom: 1em;
}
p.title-page {
  text-align: center;
}
p.publisher-logo {
  margin-top: 3em;
  text-align: center;
  margin-bottom: 3em;
}


Code:
.nospaceafter {
  margin-bottom: 0;
}
.extraspacebefore {
  margin-top: 2em;
}
.small {
  font-size: 75%;
}
.big {
  font-size: 150%;
  line-height: 150%;
}
.verybig {
  font-size: 200%;
  line-height: 200%;
}
.superbig {
  font-size: 250%;
  line-height: 250%;
}
phossler is offline   Reply With Quote