Forums
View unanswered posts | View active topics It is currently Mon May 20, 2013 2:36 am



Reply to topic  [ 3 posts ] 
 :hover style remains when leaving <li> horizontally 
Author Message

Joined: Thu Mar 15, 2012 4:50 am
Posts: 1
Post :hover style remains when leaving <li> horizontally
Hello.

I'm trying to apply background gradients to a list and its list items. The hover style breaks with CSS3PIE, however, as PIE will not remove a style from a list item's child elements when the list item is left via the left or right edges.

Tested with CSS3PIE version: 1.0beta5
Tested with IE version: 9 (native), 8 (IETester), 7 (IETester)
Reproducible: Always (inconsistently for block-type children, though)
Steps to reproduce:
  1. Make a document containing an <ul> with at least one <li> containing a child element
  2. Apply a -pie-background to the child element when the <li> is hovered
  3. Hover over the <li>
  4. Leave the <li> via the left or right edge
Expected behavior: The hover style is removed
Actual behavior: The hover style is not always removed

The following code will produce the error and illustrates that the error occurs with both inline and block children.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
   <head>
      <title>CSS3PIE test case</title>
      <style type="text/css">
         li,
         a,
         span,
         p
         {
            behavior: url("PIE.htc");
            border: 1px solid black; /* to make finding the edges easier */
            width: 5em; /* to make testing the p easier */
            padding: 1em; /* the p error seems to be dependent on size */
         }
         
         li
         {
            border: none;
         }
         
         li:hover > *
         {
            -pie-background: linear-gradient(top, #eeeeee 0%,#aaaaaa 100%);
         }
      </style>
   </head>
   <body>
      <ul>
         <li><a>Item 1</a></li>
         <li><span>Item 2</span></li>
         <li><p>Item 3</p></li>
      </ul>
   </body>
</html>


Thu Mar 15, 2012 5:41 am
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1396
Post Re: :hover style remains when leaving <li> horizontally
Does adding -pie-watch-ancestors:1; help with this?


Thu Mar 15, 2012 9:18 am
Profile

Joined: Sun Mar 18, 2012 8:29 pm
Posts: 1
Post Re: :hover style remains when leaving <li> horizontally
hey jason just tried your recommendation -pie-watch-ancestors:1; and thought I'd let ya know its working in Native IE8 and it appears to work in IE7 if you switch the rendering engine in the dev tools for IE8...

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
   <head>
      <title>CSS3PIE test case</title>
      <style type="text/css">
         li,
         a,
         span,
         p
         {
            behavior: url("PIE.htc");
            border: 1px solid black; /* to make finding the edges easier */
            width: 5em; /* to make testing the p easier */
            padding: 1em; /* the p error seems to be dependent on size */
       -pie-watch-ancestors:1;
         }
         
         li
         {
            border: none;
         
         }
         
         li:hover > *
         {
            -pie-background: linear-gradient(top, #eeeeee 0%,#aaaaaa 100%);
         
         }
      </style>
   </head>
   <body>
      <ul>
         <li><a>Item 1</a></li>
         <li><span>Item 2</span></li>
         <li><p>Item 3</p></li>
      </ul>
   </body>
</html>


Sun Mar 18, 2012 8:37 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.