W3C home > Mailing lists > Public > www-style@w3.org > August 2010

[css3-background] Describing expansion of 'background' shorthand with commas

From: Øyvind Stenhaug <oyvinds@opera.com>
Date: Thu, 19 Aug 2010 15:30:40 +0200
To: "www-style@w3.org" <www-style@w3.org>
Message-ID: <op.vhos5dl2bunlto@oyvinds-desktop>
This sentence (from 3.10) seems inaccurate:

"Given a valid declaration, the shorthand first sets each of  
‘background-color’, ‘background-position’, ‘background-size’,  
‘background-repeat’, ‘background-origin’, ‘background-clip’,  
‘background-attachment’ and ‘background-image’ to its initial value, then  
assigns explicit values given in the declaration."

Except the enumeration of background-* properties, it's basically a  
copy/paste from level 2 and doesn't consider multiple background layers at  
all. I tried to clarify it a bit, though it gets wordy fast and I'm still  
not quite happy with it (possibly because of a lack of defined terms for  
things that are somewhere in between "component value" and "property  

Given a valid declaration, the number of background layers equals the  
number of occurrences of <bg-layer> and <final-bg-layer>. For each layer  
the shorthand first sets the corresponding layer of each of  
'background-position', 'background-size', 'background-repeat',  
'background-origin', 'background-clip' and 'background-attachment' to that  
property's initial value, then assigns explicit values given for this  
layer in the declaration. Finally 'background-color' is set to its initial  
value and then assigned any explicit value given in the declaration.

(Frankly I think example XVIII might be easier to understand, but I assume  
those aren't intended to be normative.)

Øyvind Stenhaug
Core Norway, Opera Software ASA
Received on Thursday, 19 August 2010 13:29:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:49:46 UTC