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

Re: [css2] tokenization, blocks as property values.

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Tue, 26 Feb 2013 06:15:18 +0100
Message-ID: <512C44E6.6060604@kozea.fr>
To: www-style@w3.org
Le 26/02/2013 05:31, Peter Moulder a ťcrit :
> On Mon, Feb 25, 2013 at 07:34:32PM -0800, Andrew Fedoniouk wrote:
>> Reading this part: http://www.w3.org/TR/CSS2/syndata.html#tokenization
>>
>> Seem like this:
>>
>> div {
>>     some-prop: { /* prop value may contain blocks, so: */
>>       start: 0%;
>>       end: 100%;
>>       color-stops: white/0% red/100%
>>     };
>> }
>>
>> is a valid *syntax* construction from CSS 2.1 point of view.
>>
>> Am I right?

Yes, this is valid for the generic syntax of declarations in both 
css3-syntax (the new Editorís Draft being worked on) and CSS 2.1. The 
error recovery rules ensure that UAs that donít know this property will 
still correctly find the end of the declaration.

However, no existing descriptor or property accepts a syntax like this. 
It is not a style we have favored until now, but we could add such 
properties in the future. css3-variables will also accept such syntax; 
the cascaded value could be used from JavaScript.

http://dev.w3.org/csswg/css3-syntax/
http://dev.w3.org/csswg/css-variables/


> More precisely, it conforms to CSS 2.1's description of the core grammar.
> It does not conform to the grammar of valid CSS 2.1 that's described
> (non-normatively) at http://www.w3.org/TR/CSS21/grammar.html .

I donít find this grammar very useful. Itís not even CSS 2.1, but a 
superset of 2.1. As soon as you add Level 3 support for some modules, it 
becomes neither a superset nor a subset.

I find more useful to define separately the core grammar/syntax, then 
selectors, then individual property values, etc.

-- 
Simon Sapin
Received on Tuesday, 26 February 2013 05:15:43 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:06 GMT