Re: New DOM Level 2 Working Draft

L. David Baron wrote:
> There are messy issues with the border-color property.  See 
> http://lists.w3.org/Archives/Public/www-style/1999Sep/0082.html
> http://lists.w3.org/Archives/Public/www-style/1999Sep/0085.html
> 
> I think the following statement in [2] is unnecessary because the special
> system font shorthand values *can* be decomposed (and must, since
> some of the equivalent longhand properties can be changed, leaving
> others intact).  I think it should be removed:
> 
>   If the value of a shorthand property can not be decomposed into its
>   component longhand properties, as is the case for the font property
>   with a value of "menu", querying for the values of the component
>   longhand properties should return the empty string.
> 
> Furthermore, I think it would be good if [2] explicitly said that
> querying a longhand property when a corresponding shorthand property
> has set the value of that longhand property should return the
> appropriate value rather than the empty string.  That seems to be
> implied, but not clearly so.

For these issues, the DOM WG decide to leave the current draft as it is.

The special system font shorthand issue:

In [1]
"system fonts can only be specified with this property, not with 'font-family'
itself, so 'font' allows authors to do more than the sum of its subproperties."

You can't set a longhand font property to a system value. And if we allow to
return a system value on a longhand font property, then the following example
will throw an exception if the shorthand font property (on myElement2) has a
system value:
myElement1.style.fontSize = myElement2.style.fontSize;

The border-color issue: 

We can't invent a new value for this case. The border-color will be only
effective in the computed style but the specified style will give you an empty
string.

Regards,
Philippe.

[1] http://www.w3.org/TR/REC-CSS2/fonts.html#font-shorthand
---------
Philippe Le Hegaret - http://www.w3.org/People/LeHegaret/
World Wide Web Consortium (W3C), DOM Activity Lead

Received on Thursday, 25 November 1999 12:48:34 UTC