Re: Cross Referencing Between Elements

Not sure how I’d reference the state of another element with this right-hand spec proposal.  I’ve had several times where i needed at least simple cross references to just things like :hover.

For example, change the color of an element based on if some other element in the DOM tree has :hover on it, or :active.  I don’t see how a selector on the right-hand side can select that state. (maybe store the state in the source element as a variable?)

CSS does need a stateful representational model that perhaps includes time-domain considerations and variable storage… this could get rid of a lot of Javascript usage.

-bobby
---
Bobby Mozumder
Editor-in-Chief
FutureClaw Magazine
mozumder@futureclaw.com
1-240-745-5287
www.futureclaw.com
www.twitter.com/futureclaw

On Jun 12, 2014, at 1:04 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 6/12/14, 12:59 PM, Marat Tanalin wrote:
>> I meant effective pixel value of course
> 
> This is even more of a performance problem.  Even just allowing IDs means you can get cycles that are completely non-obvious and can't be tracked via just the id references.
> 
> -Boris
> 

Received on Saturday, 14 June 2014 15:41:41 UTC