View Full Version : a:hover .child - does not work properly on ADE


dieda1821
01-18-2011, 11:20 AM
Dear all,

I tried the following xhtml+css valid code:

XHTML FILE

<a href="#" alt="" class="trial">Trial<span class="red">Red text</span></a>

CSS FILE

a.trial:hover .red{
color:red;
}

This should make the "Red text" red coloured when hovering either the text "Trial" or the "Red text" one.

If I insert this code in the xhtml and css files inside an .epub, the :hover class does not work properly in ADE: it is somehow shifted to the span.red element only, and hovering the text "Trial" does not produce any effect.

In fact, "Red text" becomes red coloured when hovering itself only.

In ADE:

a.trial:hover .red{
color:red;
}

and

.red:hover{
color:red;
}

are rendered at the same way.

Does anyone know why this happens and how I could have, in ADE, something happening at a text when hovering, or eventually clicking, another element ?

I also posted the question in the ADE assistance forum (although it is too technical maybe).

Thanks in advance

Elena

pholy
01-18-2011, 02:47 PM
The last time I read through the ADE Guide, it recommended against using any dynamic elements, so they may not have been terribly well designed or tested. Most people here will be using e-ink devices, so dynamic elements are pretty much out of the question. I guess they might work on iPads or Color Nooks, and the desktop ADE, of course (but they don't...). I think you will have to experiment and report back, and perhaps some of the more knowledgeable members can help sort things out with you.

dieda1821
01-19-2011, 05:34 AM
Hi,

Thanks for your reply. The desktop ADE is not rendering the :hover properly and I was curious to see the behaviour of my Sony PRS-650, but that would have been a secondary task.

Do you know where can I report about the desktop ADE ? It seems the Adobe Digital Edition forum is not the more appropriate place (most of the comment are about trouble when authorizing e-readers)...

Elena

I guess they might work on iPads or Color Nooks, and the desktop ADE, of course (but they don't...). I think you will have to experiment and report back, and perhaps some of the more knowledgeable members can help sort things out with you.

Toxaris
01-19-2011, 09:33 AM
I am afraid you need to report it at Adobe. Don't expect to have an update soon though. I am not sure if :hover is specified in the epub-specs. If not, that the behaviour is as it should be. Not everything that works in xhtml is supposed to work in an epub.

dieda1821
01-19-2011, 11:55 AM
I am afraid you need to report it at Adobe. Don't expect to have an update soon though. I am not sure if :hover is specified in the epub-specs. If not, that the behaviour is as it should be. Not everything that works in xhtml is supposed to work in an epub.

I found here

http://www.idpf.org/doc_library/epub/OPS_2.0_latest.htm#Section2.2

the following:

"Reading Systems must support all CSS2 selectors., including pseudo-elements and pseudo-classes. However, certain pseudo-classes may not be applicable to all Reading Systems (e.g. hover for devices with a touch screen) and may not result in any rendering on such devices"

Therefore I expected some troubles with the :hover effect on my e-reader, but not on my desktop ADE.

It's a pity, that would have been at least a chance of inserting a (moderately) dynamic note in my epub (with css :hover and the display property, as for the css dropdown menu).

I can not understand why the epub standard tend to completely avoid any kind of scripting or dynamic event (like the onclick handling).

Besides, the footnotes in paper book are quite boring and the internal links in epub tend to distract the reading (especially when one has to carefully tap a tiny tiny number on the screen such as my Sony, and to tap it again to go back to the chapter).

An hidden note, to be displayed right at the word it corresponds, but just on command, would be a very nice improvement :chinscratch:

DaleDe
01-19-2011, 12:43 PM
EPUB permits rendering to be done any way the hardware wants to do it. It is certainly possible for an eBook Reader to render a footnote right on the page as an overlay like you want if the user clicks on it. This really has nothing to do with the hover CSS capability.

dieda1821
01-20-2011, 05:17 AM
EPUB permits rendering to be done any way the hardware wants to do it. It is certainly possible for an eBook Reader to render a footnote right on the page as an overlay like you want if the user clicks on it. This really has nothing to do with the hover CSS capability.

I am afraid, but it seems that this is not completely true, as you can also read in the thread of this forum here:

http://www.mobileread.com/forums/showthread.php?t=115057

The :hover pseudo-class was a trial to add some dynamic content and, as it is part of the standard, I expected it to work wherever "hovering" means something (-> a desktop pc).

Then if you want to state that the problem is not of the format itself but in the way ADE (or the e-reader) renders the code, that is true, but it makes no difference if one wants to produce an epub that is not "device dependant".

Toxaris
01-20-2011, 03:53 PM
Ah, but ADE is not the same as the IDPF. ADE is an interpretation of the EPUB specs according to Adobe. And, as alsmost everything, it is not perfect.