Re: [CSS] Rules for parsing and compatibility

On Tue, 30 Dec 2003, Ernest Cline wrote:
>
> e {border: double green 3px}
>
> @selector :outside {
>  e::outside {
>   border: solid red 1px;
>   padding: 1px;
> }
> e {
>   border:solid green 1px
> }
> }

This is already possible using almost identical syntax:

   e { border: double green 3px; }

   #at#selector e::outside,
     e::outside {
      border: solid red 1px;
      padding: 1px;
   }
   #at#selector e::outside,
     e {
      border: solid green 1px;
   }



> @selector <selector> <declaration-block>
> Applies the rules in the declaration block only if it can
> understand the selector.

Currently possible as:

  #at#selector <selector>, <real-selector> <declaration-block>


> @property <property-name> (<value>)? <declaration-block>
> If only the property name is given, then the rules in the declaration
> block are applied only if the UA uses the property.

In practice this is not that useful because UAs are notorious for claiming
to support a property while doing a bad job of it.

Similarly, the @profile rule, while theoretically interesting, is in
practice more dubious, as can be seen by the way the equivalent in DOM is
often seen to be incorrectly reported. (Do you claim to support a profile
if you support everything in the profile except one feature that you never
intend to support? What about if you support everything but, in my
opinion, that support is ridiculously buggy?)


What we _really_ need is a "commit-rollback"-style semantic for blocks of
rules so that co-dependent properties (e.g. 'display' on four different
elements trying to form a table) can be done together. Unfortunately I
have yet to see a workable solution for this (and I've been looking since
about 1999).

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
U+1047E                                         /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 31 December 2003 06:37:03 UTC