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

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

From: Kang-Hao (Kenny) Lu <kennyluck@csail.mit.edu>
Date: Fri, 01 Jun 2012 05:07:47 +0800
Message-ID: <4FC7DDA3.1020704@csail.mit.edu>
To: Brian Manthos <brianman@microsoft.com>
CC: Joe Thomas <joethomas@motorola.com>, WWW Style <www-style@w3.org>
(12/06/01 3:50), Brian Manthos wrote:
> Examples would help make sure I'm understanding the IE6 concern properly.

Based on testing IE6 and IE9. The parsing of the 'background' is pretty
normal in IE6 standards mode. But in the quirks mode of both IE6 and
IE9, 'background', as far as I can tell, is parsed as

  <'background-property'>+ <garbage>*

where an value of the same type trumps the previous value of the same
type <garbage> seems to contain a lot of things.

A concrete example:

  body { red green border-box; }

would be a green background in these quriks mode. The difference is that
IE9 recognizes border-box, but IE6 doesn't.

> That said, my impression is that you're asking/expecting pre-CSS3 browsers to read something like...
>                 background: red content-box;

I think Joe is showing the preference of a particular order. Whether
that turns out to be a rationale for this order or a counter-rationale I
don't know, but in any case this is a source of information if we want
to decide a serialization order for any CSS3 property.

Baseline: IE9 isn't a pre-CSS3 browser.

(Admittedly, I can't quite imagine why people would want to create pages
in quirks mode these days. Who knows.)

Received on Thursday, 31 May 2012 21:08:31 UTC

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