Re: [css-syntax] Comments on Parsing and following sections

Le 29/05/2013 09:42, Tab Atkins Jr. a écrit :
>> §7.1. Defining Block Contents: the <declaration-list>, <rule-list>, and
>> <stylesheet> productions
>>
>>      Similarly, the <rule-list> production represents a list of rules […]
>>
>>      Finally, the <stylesheet> production represents a list of rules.
>>      It is identical to <rule-list>, except that blocks using it default
>>      to accepting all rules.
>>
>> I don’t see the point of having <stylesheet> in this spec. It’s really the
>> same as <rule-list> since none of them really define what rules are allowed
>> in a given context. And "accepting all rules" is misleading at best. For
>> example, an @top-left margin rule is only allowed inside @page, not a the
>> stylesheet top-level. Another spec should not have to exclude it explicitly.
> I added "that aren't otherwise limited to a particular context".
>
> The value of it is that it removes some of the necessary boilerplate
> prose, and clearly distinguishes between "only this limited set of
> rules" and "all but this limited set of rules".
>
>> Also, css-conditional already has a concept of "nested statements".
> I'm not sure what this has to do with this section.

My point is that Syntax 3’s <stylesheet> seems to be the same as 
Conditional Rules’s "list of nested statements". By definition, it seems 
that <stylesheet> would only be used by conditional rules, and so might 
be redundant.


>>      For example, the ‘@font-face’ rule is defined to have no prelude […]
>>
>> I think a definition of @font-face in Syntax 3 terms would still have to be
>> a bit more formal. Its prelude must either be empty or contain only
>> whitespace tokens. (All at-rules have a prelude.)
> Whitespace is always ignored; a prelude containing only whitespace is
> identical to a prelude containing nothing, as far as the grammar is
> concerned.  (I've added a sentence about how whitespace is never
> indicated in the grammar explicitly.)

Saying "always" or "never" here is a problem. Page selectors in the 
prelude of @page rules *are* sensitive to whitespace. I wouldn’t be 
surprised if we add Selectors (and thus more whitespace-sensitivity) in 
other contexts in the future.

-- 
Simon Sapin

Received on Wednesday, 29 May 2013 03:55:01 UTC