Re: [css21] border shorthand syntax typo ?

On Fri, Mar 19, 2010 at 3:36 PM, Sylvain Galineau
<sylvaing@microsoft.com> wrote:
> In 8.5.4 [1], the border shorthand syntax is described as:
>
>        [ <border-width> || <border-style> || <'border-top-color'> ] | inherit
>
> Why border-top-color and not border-color ?

I suspect the intent was that 'border-color' has a {1,4} line that
isn't valid here, so it deferred to the most specific type of rule.
It just did so inconsistently, as 'border-width' and 'border-style'
also have {1,4} in their productions.

> CSS3 Backgrounds & Borders defines the border shorthand as:
>
>        <border-width> || <border-style> || <color>

Yup, it goes ahead and defers to Color Level 3, where 'transparent' is
a color.  No need to try and shorten productions by defining "<color>
| transparent" in one place and then reusing that production over and
over.

> [1] http://www.w3.org/TR/CSS21/box.html#border-shorthand-properties
> [2] http://www.w3.org/TR/css3-background/#the-border-shorthands

~TJ

Received on Friday, 19 March 2010 23:25:52 UTC