Re: [cssom] serialization order of components of shorthand properties

On Tuesday 2012-07-17 12:42 -0600, Glenn Adams wrote:
> On Tue, Jul 17, 2012 at 11:47 AM, L. David Baron <> wrote:
> > It would be great to get an updating reflecting the last paragraph
> > of
> > sooner rather than later, before it does harm by causing
> > implementations to change interoperable behavior.
> >
> > In particular, this affects the second bullet of
> > , which
> > currently says:
> >   # Where multiple CSS component values can appear in any order
> >   # without changing the meaning of the value (typically represented
> >   # by a double bar || in the value syntax), use the order as given
> >   # in the syntax.
> So, David, what is your position on the following?
> (1) should a canonical order be defined for serializing components of
> shorthand properties when returning values for those properties from
> CSSStyleDeclaration.getPropertyValue(propertyName)? as you point out DOM-2
> Style APIs did not define such an order, however the current CSSOM [1] ED
> does define an order (in terms of the syntactic order of the specific
> property's definition).

It should be defined.

> [1]
> (2) if the answer to (1) is yes, then which syntactic definition should
> apply in the face of (historical) discrepancies? e.g., the order of
> components of 'background' shorthand vary between CSS2.1 [2] and CSS3
> Backgrounds and Borders [3].

That's only an issue if cssom suggests using the "Value" line, which
is what I'm saying that it should not do.

This is because it shouldn't be defined in a way that's incompatible
with existing implementations.  This means that before we make a
definition of the canonical serialization order for each property,
we should research what existing implementations do, so that we
don't encourage implementations to change in cases where they're
currently all interoperable.

That's why I think the property templates should define a "Canonical
order" line, and cssom should not suggest inferring one from the
"Value" line.


𝄞   L. David Baron                  𝄂
𝄢   Mozilla                    𝄂

Received on Tuesday, 17 July 2012 18:50:37 UTC