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

On Mon, Feb 25, 2013 at 8:31 PM, Peter Moulder <peter.moulder@monash.edu> wrote:
> 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?
>
> 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 .

So core grammar (normative) is a superset of non-normative
grammar definition. Whatever such core/non-core split means.

>
> A quick search doesn't turn up any normative text saying that property values
> can't contain blocks, but OTOH there's no CSS 2.1 property called "some-prop",
> and none of the properties that CSS 2.1 does define allow blocks in their
> values.
>

some-prop is just a hypothetical property.

If some UA will decide to use something like this:

element {
   -some-ua-columns: { number: auto;  width: 100px;  };
};

then it will be handled without any parsing errors by UAs that do not know
anything about -some-ua-columns concept.

Indeed, according to http://www.w3.org/TR/CSS21/syndata.html#parsing-errors
such block property value shall fall into "Unknown properties" case. So
being consumed happily by the parser without any effect on other properties.


-- 
Andrew Fedoniouk.

http://terrainformatica.com

Received on Tuesday, 26 February 2013 05:04:06 UTC