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