- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Tue, 29 Apr 2003 10:30:57 -0500
- To: Andy <aholmes84@shaw.ca>, www-style@w3.org
Andy wrote: > Ok point taken, maybe selecting based on all CSS properties isn't > perfect idea. But surely you can't disagree that selecting based on > display type or the like is a bad? Why is display special? Note that if such a selector is introduced it could only be used for _one_ property; otherwise the problems I mentioned arise. Even then, what happens with: *:display(block) { display: inline } ? Or for that matter with: *:display(inline) { float: right } ? One of the basic principles of CSS at the moment is that determining which rules apply to an element and computing the style of an element are separate processes; the former does not depend on the latter in any way. This allows some rather significan optimization on the UA end (for example, you don't have to recompute all style for every rule that applies to the element; you can just take all rules that apply and compute the style once, bailing out of looking at lower-precendence rules if the style is fully specified by the higher-precedence ones). Changing this property of CSS would probably require pretty complete rewrites of all existing CSS engines (nothing wrong with that per se, but that means that it should be considered very carefully).
Received on Tuesday, 29 April 2003 11:31:00 UTC