When I use Calibre to convert ebooks, then it adds a completely new property to a .hidden_content class:
.hidden_content {
display: none;
margin-bottom: 0.7em;
}
The margin-bottom then results in ebooks adding hundreds of useless blank pages between the chapters.
As a workaround, I'm developing a rather involved xmlstarlet script to strip the hidden and hidden_content-class tags from my books. (Neither the Calibre built-in style nor html tag rules engine is able to easily remove these.)
https://github.com/mcandre/nile