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

Re: [css21] border shorthand syntax typo ?

From: Řyvind Stenhaug <oyvinds@opera.com>
Date: Mon, 22 Mar 2010 14:16:23 +0100
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "www-style@w3.org" <www-style@w3.org>
Message-ID: <op.u9y0hlxoru61ud@oyvinds-desktop>
On Sat, 20 Mar 2010 00:24:59 +0100, Tab Atkins Jr. <jackalmage@gmail.com>  
wrote:

> 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.

No, there is no inconsistency; the first two options don't have  
apostrophes, so they refer to a generic border-width/border-style types,  
not the range of values accepted by the 'border-width'/'border-style'  
properties.

<border-width> = thin | medium |thick | <length>
<'border-top-width'> = <border-width> | inherit
<'border-width'> = <border-width>{1,4} | inherit

-- 
Řyvind Stenhaug
Core Norway, Opera Software ASA
Received on Monday, 22 March 2010 13:16:15 GMT

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