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

Re: [css-background] Order of properties in background shorthand

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 01 Jun 2012 02:44:39 -0400
Message-ID: <4FC864D7.6040904@mit.edu>
To: www-style@w3.org
On 6/1/12 2:33 AM, Sebastian Zartner wrote:
> So what I get out of this discussion is that the order, in which a browser returns the properties of a shorthand property via getComputedStyle(), is not dictated. Is that correct?

It really depends on the property.

For example, these two declarations:

   font: 12px Times;
   font: Times 12px;

are not equivalent.  The former is valid, and the latter is not.

As another example, these two declarations:

   font: 12px bold Times;
   font: bold 12px Times;

are both valid, but don't mean the same thing.  The former means a 
normal weight 12px font of the "bold Times" family, while the latter 
means a bold 12px font of the "Times" family.

What the spec does not dictate is the order in which things separated by 
"||" in the "Value" line are serialized.

-Boris
Received on Friday, 1 June 2012 06:45:08 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:55 GMT