View Single Post
Old 06-29-2016, 12:55 AM   #24
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by capidamonte View Post
I'm not expert enough to answer the following question, nor in a position to experiment but... as long as there was no more than one link to the common target from a single html page (ie: in the chapter) could you link in a different css for each chapter with a different set of css variables? (If there was more than one link in the chapter, you'd only be able to pick one variable to come back to even with this hacky idea.)

Then if there was no css linked in the target's html, could it inherit the css of the preceding html page? If so, you could set the variables in the chapter's linked css and the target's html would use them.

So, in every chapter that you want a different return value you vary that value in the css variable.

Probably wouldn't work, but if there is a way to force that inheritance, it might. @import, maybe? I'm probably way off base here -- surely when you jump between an epubs internal documents, all prior css is lost...

2¢, and worth every penny.

Aloha.

ps: @document in your master css with nested anchor tags for every origin link at the target? So when you leave chapter 17 for the target html you link to its <a href="target.html#chapter17"> anchor, and your CSS variable gets applied? I don't know if the URL can include anchors for @document. ... or maybe a unique string in that anchor, and use the regexp function of @document?
Cap:

Sweetie, you intrigue me, you do. I may give that a go this weekend, if I get some free time. Hmmmmmm....although knowing Tex, he may leap into testing it first. :-)

Hitch
Hitch is offline   Reply With Quote