W3C home > Mailing lists > Public > www-style@w3.org > November 2012

Re: [CSS3] background-position computed value.

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 28 Nov 2012 12:59:44 -0800
Message-ID: <CAAWBYDBcZGjkVGmwcnVf7mM=c3iz8EcdmG6H04teL76yvYNWQg@mail.gmail.com>
To: "Menard, Alexis" <alexis.menard@intel.com>
Cc: W3C style mailing list <www-style@w3.org>, "jchaffraix@webkit.org" <jchaffraix@webkit.org>
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.

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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:23 UTC