Re: [cssom] comments on value serialization rules

On Thursday 2010-02-18 15:00 +0100, Anne van Kesteren wrote:
> >  Define "escape as an string" as a string represented by the
> >  concatenation of, for each character:
> >   * if the character is in the range U+0000 to U+001F, the
> >     character serialized as a codepoint escape
> >   * if the character is '"' (U+0022), "'" (U+0027),  or '\'
> >     (U+005C), the character serialized as a character escape
> >   * otherwise, the character itself
> 
> Do you think we can leave U+0027 out if we ensure that strings
> always end up between double quotes?

Yes, but if so, it's probably worth noting that restriction in the
spec.

(It also means that we would have to make sure never to serialize
strings using their original delimiters, but always convert '' to
"".)

> >I'm not particularly committed to keeping it that way, though.
> >However, I'm somewhat concerned about the idea of switching to
> >#rrggbb notation since rgb() can handle out-of-sRGB values whereas
> >#rrggbb cannot.  (Gecko doesn't currently implement that, but I'd
> >like to.)
> 
> And then sometimes serialize to percentages? Or would you propose a
> change to the rgb() syntax as well? My main gripe here is <canvas>
> which uses #rrggbb and IE, which also uses #rrggbb (though I should
> probably test that again to be sure).

rgb() allows rgb(300,-10,300).

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/

Received on Thursday, 18 February 2010 16:06:53 UTC