W3C home > Mailing lists > Public > www-style@w3.org > January 2010

Re: Proposal: @property(value) Selector

From: François REMY <fremycompany_pub@yahoo.fr>
Date: Mon, 25 Jan 2010 10:49:23 +0100
Message-ID: <146934F77F6B42B0B76AB67D5DFE43EC@Fremy1>
To: <www-style@w3.org>
From: "L. David Baron" <dbaron@dbaron.org>
Sent: Monday, January 25, 2010 6:14 AM
To: <www-style@w3.org>
Subject: Re: Proposal: @property(value) Selector

> On Sunday 2010-01-24 19:54 -0800, Alex Mitchell wrote:
>> If the property used in the @property(value) is defined inside of the
>> rule, it would give a parse error and drop the rule, just as if you were
>> to put an invalid value for margin or another property.
> That's not sufficient, since you can have arbitrary cycles.

Such cycles would be defined so :

div { color: red; }

div:CSSValue(color, red) {
    background: white;

div:CSSValue(background, white) {
    color: blue !important;

> [...]
> I think you'd need to present strong use cases for such a selector
> for it to be adopted.

I think they are use-cases, but maybe it would be simpler to define
the thing so :

div { color: red; }

div {
    background: iif(color='red', 'white', 'initial');

This would have a different comportement than
what has been asked by Alex, but at least, it would
not require an huge modification of the way the 
css rules are supported. I think many uses cases
would be covered. For more complex one, using a 
script would be needed.

The only 'problematic case' would be :

div {
    color: iif(background='white', 'red', 'initial');
    background: iif(color='red', 'white', 'initial');

This case could be handled so :

"When a depency cycle is encountered, the condition
of the first property in alphabetical order of the cycle
is considerated as false and all others properties are
evaluated accordoingly." 
Received on Monday, 25 January 2010 09:49:56 UTC

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