Re: @version rule

On Mon, 30 Jul 2001, Stuart Ballard wrote:
>
> If the @combine were done on a per-selector basis,

...then it would be near useless for the majority of cases, which are
setting background colours on one element and text colours on another, or
setting 'display' to a set of table-related values for a subtree of
elements. However, ignoring that:


> it could be specified like this:
>
> @combine selector { property1: value1; property2: value2 }
>
> This would mean:
>
> Apply these properties ONLY if you understand both properties and both
> values, and ONLY to elements that:
> a) are matched by the selector, AND
> b) are not matched by any rule with a higher precedence in the cascade
> that would set a value for either property1 or property2.
>
> How does that sound?

It sounds hard to implement... It means you can no longer do the cascade
in an efficient way (asking only for the properties that are relevant),
since if you ask for property 'a', and property 'a' is linked to property
'b', which is itself linked to property 'c' somewhere, then to get 'a' you
have to resolve style for all rules with 'c' in it...

Altogether, a suboptimal solution. :-)

-- 
Ian Hickson                                            )\     _. - ._.)   fL
Invited Expert, CSS Working Group                     /. `- '  (  `--'
The views expressed in this message are strictly      `- , ) -  > ) \
personal and not those of Netscape or Mozilla. ________ (.' \) (.' -' ______

Received on Monday, 30 July 2001 16:55:36 UTC