W3C home > Mailing lists > Public > www-style@w3.org > March 2010

Re: [css21] border shorthand syntax typo ?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 19 Mar 2010 16:24:59 -0700
Message-ID: <dd0fbad1003191624i46e007ebr2754d0de70e6ff2@mail.gmail.com>
To: Sylvain Galineau <sylvaing@microsoft.com>
Cc: "www-style@w3.org" <www-style@w3.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:25 GMT