W3C home > Mailing lists > Public > www-style@w3.org > August 2002

Re: "||" lists of values

From: Ian Hickson <ian@hixie.ch>
Date: Sat, 31 Aug 2002 18:40:29 +0000 (GMT)
To: Robin Berjon <robin.berjon@expway.fr>
Cc: "www-style@w3.org" <www-style@w3.org>
Message-ID: <Pine.LNX.4.21.0208311829140.2213-100000@dhalsim.dreamhost.com>

On Tue, 27 Aug 2002, Robin Berjon wrote:
> 
> Hi,
> 
> I can't seem to find a place that states whether values described using 
> "||" correspond to lists that are whitespace or comma separated, or both.

It's neither.

In the CSS spec, || means "one or more of these options, in any order". It
doesn't say whether the options are single tokens, multiple tokens,
strings, identifiers, commas, spaces, or whatnot.

Typically, the list will contain just a single type, for example:

   <border-width> || <'border-top-color'> || <'border-style'>

if you decide to include the width and the style, and decide to make them
'medium' and 'solid' respectively, then you have to separate the tokens
using whitespace to make the two tokens parsable as two tokens:

   medium solid

...or

   solid medium

...or

   solid
   medium

...or any number of other such combinations. Note that since a comma is a
token in itself, it should not be included:

   solid, medium

...is three tokens, not two.

If a comma (or slash) is needed, it'll be explicitly listed in the value
definition for the property. See, for instance, 'font' or 'font-family'.

See: http://www.w3.org/TR/REC-CSS2/about.html#property-defs

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
"meow"                                          /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'
Received on Saturday, 31 August 2002 14:40:35 GMT

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