View Single Post
Old 03-01-2018, 11:15 AM   #5
Brett Merkey
Not Quite Dead
Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.
 
Posts: 195
Karma: 654170
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
@rjwse: Your file can challenge some machines. You reference css files which do not exist but Calibre tries to retrieve anyway. In addition, your active css file has text which you must have meant to include in comments. I'm sure this also made Calibre work a bit hard.

I eliminated most of your code and split on H1 tags. Then I merged. I see what you mean. At least I probably expected the behavior you did. However, I did not find in the W3C spec that this :first-of-type behavior is wrong.

I tested this by changing the H1 tags to H2, beginning at the end of the file. I also changed the rule in the css file to H2. No dropcaps until I had changed the very first H1 to H2 (!) Apparently the structure is interpreted to mean the first-of-type of ALL p siblings, not just those related to any particular OTHER sibling. This appears to agree with W3C specs, even tho they are somewhat vague on this.

As I understand it, the definition of :first-of-type trumped your use of the general sibling combinator.

Last edited by Brett Merkey; 03-01-2018 at 11:35 AM.
Brett Merkey is offline   Reply With Quote