View Single Post
Old 02-11-2024, 02:56 AM   #94
chrisridd
Guru
chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.
 
chrisridd's Avatar
 
Posts: 983
Karma: 2209358
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, PocketBook InkPad Color 3
What sorts of automated tools are there that can help improve the HTML/CSS used in a book? For example:
  • Moving all inline styles into a shared CSS file
  • Only using classes/ids to style the exceptional cases, not the normal cases
  • Removing redundant declarations from the CSS file
  • Using more semantic HTML - from <div class="para"> to <p> for example
  • ... others?

There are CSS "minifier" tools that may help removing redundant declarations, though (I just tried one) and they seem to optimise for compactness and perhaps not human readability.

Personally I'd kill for a tool that could correctly replace HarperCollins' awful typographical mess in their Discworld books of:

Quote:
Code:
<span class="smallCaps">HELLO I'M DEATH</span>
and
Code:
.smallCaps { font-size: small }
(usually much more complex) into:

Quote:
Code:
<span class="smallCaps">Hello I'm Death</span>
and
Code:
.smallCaps { font-variant: small-caps }
But this is a really really specific itch
chrisridd is offline   Reply With Quote