Re: [CSS3] background-position computed value.

On Wed, Nov 28, 2012 at 12:16 PM, Menard, Alexis
<alexis.menard@intel.com> wrote:
> I’m a bit puzzled on the CSS3 computed style value for background-position.
>
> In CSS 2.1 the computed value is defined as “ for <length> the absolute
> value, otherwise a percentage”. It will always return two values, so for
> example “left” will return 0% 50%, “30px 40px” will return 30px, 40px. FF,
> Opera, and WebKit behaves like this, always two values are returned, no
> keywords.
>
> Now let’s take the definition as in CSS3. “A list, each item consisting of:
> two keywords representing the origin and two offsets from that origin, each
> given as an absolute length (if given a <length>), otherwise as a
> percentage”.
>
> So of course something like left 20px top 40px should return “left 20px top
> 40px”.
>
> Now my question is what about the old behavior, let say background-position
> was set like this : 30px 40px. Should it return “30px 40px” as before or
> should it return “left 30px top 40px” to match the definition but then break
> the backward compatibility? I believe backward compatibility should be
> preserved and then the specification wording is not accurate as you may not
> get two keywords and two offsets every time.
>
> As it is today Opera returns the old computed values, a list of two values
> and in the case of the new <position> type, the computed value as described
> by the CSS3 spec.
>
> Any thoughts?

The "computed value" and the serialization are two different things.
We can change the former as necessary as we expand the property's
value, without necessarily affecting the latter.

That said, serialization is *drastically* underdefined.

~TJ

Received on Wednesday, 28 November 2012 21:00:32 UTC