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

Re: [css3-conditional] value of CSSSupportsRule.conditionText

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sat, 4 Aug 2012 15:29:48 -0700
Message-ID: <CAAWBYDB5DevEEr4_Gq0XwV7KXkRrrvJyMC5VvDtUY8E4rQxTiA@mail.gmail.com>
To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Cc: www-style@w3.org
On Sat, Aug 4, 2012 at 12:26 PM, Daniel Glazman
<daniel.glazman@disruptive-innovations.com> wrote:
> Le 04/08/12 06:51, Cameron McCormack a écrit :
>
>> It's not exactly clear to me what should be included in conditionText
>> when it comes to white space and comments. For example, with:
>>
>> @supports (a: b) {}
>>
>> My guess is that we would want to return "(a: b)" rather than "(a: b )"
>> or " (a: b) ". But looking at the grammar, I think supports_condition
>> should actually include the trailing white space since there a "S*" at
>> the end of each production. So I think the spec should say to trim white
>> space of the string that is returned.
>>
>> But comments should probably stay, since if you think there is
>> implicitly a COMMENT* between after each other symbol in the grammar
>> then it would be included in the supports_condition, and it isn't as
>> simple to trim comments from the string. So for:
>>
>> @supports /*1*/ (a: b) /*2*/ {}
>>
>> I think it should return "(a: b) /*2*/".
>
>
> No. None of our existing serializations outputs comments and I don't
> see why we should start here. In current implementations, comments
> are usually stripped at parse time anyway by the lexer.

...which Syntax also specifies. Everything here will be a bit simpler
once I finish up Syntax, as we'll have a clear and definite answer to
these kinds of questions (or at least a clear and definite base from
which to make alterations from).

~TJ
Received on Saturday, 4 August 2012 22:30:35 GMT

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