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

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

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Mon, 06 Aug 2012 09:22:45 +0200
Message-ID: <501F70C5.3090306@kozea.fr>
To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
CC: "Tab Atkins Jr." <jackalmage@gmail.com>, Cameron McCormack <cam@mcc.id.au>, www-style@w3.org
Le 06/08/2012 08:43, Daniel Glazman a écrit :
> Le 05/08/12 22:12, Tab Atkins Jr. a écrit :
>>>     @supports (a: 1/**/.1) {}
>>> I think you would want the condition to be serialized either as "(a: 1 .1)"
>>> or "(a: 1 0.1)" and not "(a: 1.1)" or "(a: 10.1)", even though there was
>>> originally no white space token between the two numbers.
>> Good point.  I'll put an issue in Syntax for this.
> Given that comments are allowed anywhere between tokens but not inside
> tokens, that should already be the case, right?

The problem is when serializing tokens to a CSS string. Some tokens can 
not be written next to each other because they would not have the same 
meaning when tokenized again.

The example is 1/**/.1
If the tokenizer ignores comments, it will give two NUMBER tokens. 
Serializing them naively gives 1.1, which is now a single token with a 
different meaning.

Simon Sapin
Received on Monday, 6 August 2012 07:23:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:19 UTC