W3C home > Mailing lists > Public > www-style@w3.org > February 2004

Re: computed values, inheritance, and short hand

From: fantasai <fantasai@escape.com>
Date: Fri, 13 Feb 2004 14:52:21 -0500
Message-ID: <402D2AF5.6000009@escape.com>
To: Tantek Çelik <tantek@cs.stanford.edu>, www-style@w3.org

Tantek Çelik wrote:
>
> Splitting up the shorthand in Ian's example derives to:
> 
>   div { border: none 2em red; }
>   span { border-style:inherit; border-color:inherit; border-width:inherit;
> border-style: solid; }
> 
> which simplifies to (since the latter declaration wins in a rule):
> 
>   div { border: none 2em red; }
>   span { border-color:inherit; border-width:inherit; border-style: solid; }
> 
> Now, does the span have a border or not?
> 
> Specifically, does border-width:inherit inherit a zero width computed border
> from the div, due to the div's computed border-style of none?

Per spec, yes.

Imho, though, that's counterintuitive. Perhaps the spec could write that
the *used* value (as opposed to the computed value) of a 'none' or
'hidden' border is zero.

So, the description for 'none' would be (see issue 196)
   >  No border; the used value of the border width is zero.

and the "'0' if the border style is 'none' or 'hidden'" part of the
border-width property definition table would be removed.

   http://www.w3.org/TR/CSS21/box.html#propdef-border-width

~fantasai
Received on Friday, 13 February 2004 14:53:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:26 GMT