RE: [css3-images] Serialization

Bjoern Hoehrmann:
>How values are serialized would only be important if people post-process the serialized values
Incorrect.  Testability is just one of many things that make it important to be crisp, if the serialization section remains normative in the WD.


>Compatibility issues aside
"Compatibility issues aside" pretty much excludes the entire web from "now" back to the dawn of the internet.  That's a pretty big assumption.


> you'd turn #rrggbb and rgb(...) into rgba(...) as the rgba notation
Why?  I wouldn't.  For fully opaque colors, it's unnecessarily verbose and unusual to force rgba when rgb() or #rrggbb was provided by the author.

#fffefd: 7 characters
rgba(255, 254, 253, 1): 22 characters

~3x the size to express the same meaning


> rgba notation is a strict su- per set of the former two in terms of what it can represent
It's not a strict superset of hsl() or hsla().  So should hsl/hsla stay as is or be converted to rgba to have a consistent canonical form for colors?

Should keywords such as "blue" be converted as well?  That's an unfortunate loss of expressiveness.   Especially if we try to introduce something like color-adjust-opacity(blue, 0.5) someday.


> So I'm not sure this is a matter of being verbose and precise versus being terse.
Transmit efficiency is another concern (as mentioned briefly above).  An omitted parameter costs nothing to transmit, while a required-on-output  parameter does have a cost.

Required parameters on output also bloat pages such that sometimes they don't round-trip.  For example, if your property parser supports N characters and a web page uses N characters but omits the first parameter of a linear-gradient background-image then the value won't round-trip once the required-on-output parameter is added.


Then there's the issue of horizontal-then-vertical vs. vertical-then-horizontal with background-position serialization vs. <bg-position> within radial-gradient.


There's more, but I'd rather not rehash the entire discussion of concerns with the serialization proposed for gradients in the images spec.

-Brian

Received on Tuesday, 19 July 2011 00:29:54 UTC