New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Stylesheets break anchor links #31

Open
dvschultz opened this Issue Jul 9, 2014 · 6 comments

Comments

Projects
None yet
4 participants
@dvschultz
Owner

dvschultz commented Jul 9, 2014

from @makeBetterEBooks here: #22 (comment)

Some more fun and games, in ADE 1.7 if multiple CSS sheets are referenced by the same HTML page, internal hyperlinks will go to the top of that HTML page, NOT the specific anchor.

Never did extensive testing, so unsure if it was the presence of multiple CSS sheets, or the fact that the second one was for mobi.

@dvschultz dvschultz added the ADE label Jul 9, 2014

@teytag

This comment has been minimized.

Show comment
Hide comment
@teytag

teytag Jul 10, 2014

Hi,

My solutions;

screen shot 2014-07-10 at 12 58 26 pm
screen shot 2014-07-10 at 12 54 00 pm
screen shot 2014-07-10 at 12 56 52 pm

teytag commented Jul 10, 2014

Hi,

My solutions;

screen shot 2014-07-10 at 12 58 26 pm
screen shot 2014-07-10 at 12 54 00 pm
screen shot 2014-07-10 at 12 56 52 pm

@dvschultz

This comment has been minimized.

Show comment
Hide comment
@dvschultz

dvschultz Jul 10, 2014

Owner

@teytag I don’t think this answers the problem: when multiple stylesheets exist, anchor links are broken. This shows you can load multiple stylesheets, but not that anchor links work.

Owner

dvschultz commented Jul 10, 2014

@teytag I don’t think this answers the problem: when multiple stylesheets exist, anchor links are broken. This shows you can load multiple stylesheets, but not that anchor links work.

@teytag

This comment has been minimized.

Show comment
Hide comment
@teytag

teytag Jul 10, 2014

@dvschultz This error may be momentary. I think this error is not multiply sourced stylesheet. Could you show your codes?

teytag commented Jul 10, 2014

@dvschultz This error may be momentary. I think this error is not multiply sourced stylesheet. Could you show your codes?

@JayPanoz

This comment has been minimized.

Show comment
Hide comment
@JayPanoz

JayPanoz Jun 3, 2016

It's actually worse… (and it still lives in BlueFire for instance)

Say you've got an HTML file A with a link to another HTML File B:

  1. A.html got one stylesheet, ids are used for callback
  2. B.html got two stylesheets, href points to A.html#id
  3. when you click B.html to go back to A.html#id, you're back at the top of A.html, not at the id.

So it doesn't only impact one HTML file but 2 when 1 of them got multiple stylesheets.

JayPanoz commented Jun 3, 2016

It's actually worse… (and it still lives in BlueFire for instance)

Say you've got an HTML file A with a link to another HTML File B:

  1. A.html got one stylesheet, ids are used for callback
  2. B.html got two stylesheets, href points to A.html#id
  3. when you click B.html to go back to A.html#id, you're back at the top of A.html, not at the id.

So it doesn't only impact one HTML file but 2 when 1 of them got multiple stylesheets.

@tooolbox

This comment has been minimized.

Show comment
Hide comment
@tooolbox

tooolbox Jun 3, 2016

@JayPanoz Curious how this relates to #22 and the workaround that it has--putting Media Queries in a separate CSS file. So if you do that, your hyperlinks are toast?

Just want to make sure I understand.

tooolbox commented Jun 3, 2016

@JayPanoz Curious how this relates to #22 and the workaround that it has--putting Media Queries in a separate CSS file. So if you do that, your hyperlinks are toast?

Just want to make sure I understand.

@JayPanoz

This comment has been minimized.

Show comment
Hide comment
@JayPanoz

JayPanoz Jun 3, 2016

I've actually experienced that this morning for an ePub 3 file as I usually put everything “progressive enhancement” is a separate CSS file. So:

  • there was a link in the xhtml file with only 1 stylesheet to the file with 2 stylesheets;
  • there was a link back in this file with 2 stylesheets, it was heading to an id in the first file;
  • tested it back to ADE 1.8 and everything was OK;
  • tested it in some apps using RMSDK and the bug applied (e.g. Bluefire Reader iOS, etc.) → instead of heading to the id, it headed to the top of the xhtml file where the id was.

Now, the file with the id got one single stylesheet… only the other one got 2. So it also impacts a file with one stylesheet if the link is in another xhtml file which got 2.

bug

JayPanoz commented Jun 3, 2016

I've actually experienced that this morning for an ePub 3 file as I usually put everything “progressive enhancement” is a separate CSS file. So:

  • there was a link in the xhtml file with only 1 stylesheet to the file with 2 stylesheets;
  • there was a link back in this file with 2 stylesheets, it was heading to an id in the first file;
  • tested it back to ADE 1.8 and everything was OK;
  • tested it in some apps using RMSDK and the bug applied (e.g. Bluefire Reader iOS, etc.) → instead of heading to the id, it headed to the top of the xhtml file where the id was.

Now, the file with the id got one single stylesheet… only the other one got 2. So it also impacts a file with one stylesheet if the link is in another xhtml file which got 2.

bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment