99problems icon indicating copy to clipboard operation
99problems copied to clipboard

kindlegen parses css incorrectly

Open gimsieke opened this issue 10 years ago • 2 comments

This CSS:

.appendix .hidden {
  display: none;
}

gives the message:

Error(parsing):E3013: More number of characters are hidden using 
display:none than allowed limit. Limit: 10000 in File: … line 8

when there is a div.appendix with more than 10,000 characters.

kindlegen 2.9 apparently stops parsing the selector at the first space. The selector pertains to some .hidden element within an .appendix element, and there was none such. kindlegen erroneously assumed that it applied to any .appendix. If that’s the quality of their CSS parsing also for display then good luck with reproducing your fancy layout on the Kindle.

Removing the rule or changing the selector to, for example, .appendix.hidden, let the message disappear.

It’s frustrating when customers ask us to fix stuff that we didn’t cause and that isn’t problematic at all in the first place.

gimsieke avatar Sep 07 '15 13:09 gimsieke

Yes, Kindlegen treats the selector .appendix .hidden as .appendix, .hidden which has some awkward results. I'd never seen the "hidden character limit" before.

I wrote a Javascript module that simplifies your CSS to levels that Kindlegen can easily use, which you can find here: https://github.com/allscribe/allscribe. It's not well-documented, and you have to be a programmer to use it, but the hard work has been done.

tooolbox avatar Sep 27 '15 05:09 tooolbox

Here we are, three years, later, and this bug still exists.

dauwhe avatar Oct 30 '18 17:10 dauwhe