W3C home > Mailing lists > Public > www-style@w3.org > July 2008

Re: Parent Combinator / Parent pseudo-class

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Thu, 24 Jul 2008 22:01:16 -0700
Message-ID: <48895E1C.7030307@terrainformatica.com>
To: Francois Remy <fremycompany_pub@yahoo.fr>
CC: Boris Zbarsky <bzbarsky@MIT.EDU>, www-style list <www-style@w3.org>

Francois Remy wrote:
> 
> From: "Andrew Fedoniouk" <news@terrainformatica.com>
>>
>> Francois Remy wrote:
>>>
>>> Yes, there's another solution : you can watch change applied on the 
>>> elements that can change the value of the rule.
>>> But it's not possible to know when an element changes in JScript...
>>
>> Imagine that I you have some event that is fired when one of its
>> attributes, states or its subtree is getting changed.
>> (Lets put aside for the second when such an event needs to be fired)
>>
>> How it will help you?
> 
> You don't need to run the whole selector each time there's a DOM 
> modification, only each one that are applying on elements that are 
> concerned by the rule.

First:

Let's say for the selector:

html:with-child(a:hover) p
{
   border: 1px solid green;
}

what would be the mechanism that does "only each one
that are applying on elements that are concerned by the rule"?

Second:

Consider these two selectors:

p
   {
     border: none;
   }

html:with-child(a:hover) p
   {
     border: 2em;
   }

and markup:

<html>
   <p><a href="*">sample</a></p>
</html>

In such case selector above will never be true
if to assume that computation of selectors happens instantly.

On real world PCs with finite time needed for computation you
will see nice oscillation.


-- 
Andrew Fedoniouk.

http://terrainformatica.com
Received on Friday, 25 July 2008 05:02:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:10 GMT