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.


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"?


Consider these two selectors:

     border: none;

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

and markup:

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

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.

Received on Friday, 25 July 2008 05:02:06 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:38 UTC