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

Re: [css-variables] testsuite status and interoperability

From: Chris Lilley <chris@w3.org>
Date: Fri, 17 Feb 2017 17:39:47 -0500
To: www-style@w3.org, Geoffrey Sneddon <me@gsnedders.com>
Message-ID: <523fb1e6-24cc-7a33-6507-6b7d44fd6d38@w3.org>
> What we don't have good coverage for is usage of url() in variables
> (Chrome fails to resolve relative URLs in that case[1]), serialisation
> of values (Chrome does crazy stuff[2]—though do we actually spec this?
> all I can see is §4.1 defining how the property name is serialised?),
> and tests that ensure substitution is done at a token level (Firefox
> doesn't do this[3]).

About the serialization of values. Firstly yes, we resolved that custom 
properties must preserve their input exactly for serialization

https://logs.csswg.org/irc.w3.org/css/2016-09-19/#e722375

and there is non-interop. Look at this testcase in Firefox and then in 
Chrome - Firefox preserves the comment, Chrome does not.

https://jsfiddle.net/6ogth0dj/

On the other hand, that serialization appears to be specced in css-syntax
https://drafts.csswg.org/css-syntax/#serialization

and says (my italics)

> The tokenizer described in this specification does not produce tokens 
> for comments, or otherwise preserve them in any way. Implementations 
> may preserve the contents of comments and their location in the token 
> stream. If they do, this preserved information must have no effect on 
> the parsing step.
>
> This specification does not define how to serialize CSS in general, 
> leaving that task to the CSSOM and individual feature specifications. 
> In particular, /the serialization of comments and whitespace is not 
> defined/.
>

so that seems to a) pertain to a different spec, b) be conformant to 
that spec.

The only testable  thing about serialization in css-variables is

> Custom property names must be serialized with the casing as provided 
> by the author.

and then goes on to kind of contradict itself by saying that 
implementations typically don't do that.

> Ordinarily, property names are restricted to the ASCII range and are 
> ASCII case-insensitive 
> <https://infra.spec.whatwg.org/#ascii-case-insensitive>, so 
> implementations typically serialize the name lowercased. 

https://drafts.csswg.org/css-variables/#serializing-custom-props

Wondering what testable assertion in css-variables remains for this aspect.

-- 
Chris Lilley
@svgeesus
Technical Director @ W3C
W3C Strategy Team, Core Web Design
W3C Architecture & Technology Team, Core Web & Media
Received on Friday, 17 February 2017 22:39:58 UTC

This archive was generated by hypermail 2.3.1 : Friday, 17 February 2017 22:39:59 UTC