Skip to content
This repository has been archived by the owner on Apr 26, 2022. It is now read-only.

linking to ranges (sometimes extensive) #59

Open
RachelComerford opened this issue May 9, 2018 · 2 comments
Open

linking to ranges (sometimes extensive) #59

RachelComerford opened this issue May 9, 2018 · 2 comments
Labels
Best Practice use for Best Practice documentation questions and suggestions

Comments

@RachelComerford
Copy link
Contributor

From BISG survey

@RachelComerford RachelComerford added the Best Practice use for Best Practice documentation questions and suggestions label May 9, 2018
@dauwhe
Copy link
Contributor

dauwhe commented May 11, 2018

What is the desired behavior?

One could use the CSS [target] pseudo-class and a wrapper element around the range in question (if possible). Clicking on a link to the range could then result in a background color or other highlighting of the entire range.

If the range is not expressible as a node (for example, the 2nd half of one paragraph + the 1st half of the next paragraph), then things get more complex. It's gonna be a while until we have overlapping markup in ebooks :)

@JayPanoz
Copy link

One could use the CSS [target] pseudo-class and a wrapper element around the range in question (if possible)

I’ve had feedback from @danielweck about this in ReadiumCSS. Emphasis mine.

Problem: several EPUB reading systems (including Readium(1), iBooks iOS/OSX, Edge) seem to interfere with URL anchor / fragment identifier, thereby breaking CSS :target pseudo-class. This is something I have been keen to get right in Readium2, where the navigation logic (link activation) is also "hijacked" by some kind of reading system logic, especially in Electron as we listen to DOM click event, as well as higher-level / platform-specific navigation events via a WebView API (which allows us to capture the annoying window.location programmatic redirects that InDesign uses, among other things).

So I’m not particularly optimistic about this option.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Best Practice use for Best Practice documentation questions and suggestions
Projects
None yet
Development

No branches or pull requests

3 participants