[css21][css3-background] background-position examples conflict with prose/grammar

Per the grammar definition and prose of section 3.6[1], the horizontal component of the offset must come before the vertical one when both are specified. 

"If two values are given and at least one value is not a keyword, then the first value represents the horizontal position (or offset) and the second represents the vertical position (or offset)."

This is reflected in all the declarations of Example VIII.

Example X, however, switches this order in the second background shorthand declaration:

	body { background: url("banner.jpeg") top center }   /*  50%   0% */

This is most like because the example was copied from CSS2.1[2] where the grammar spec seems to allow that top comes before center while the prose is as above. 

In section 3.10[3], background shorthand's Example XVI, the vertical component also comes first:

	E { background: #CCC top left url("metal.jpg") / 100% auto no-repeat}

Errors or misread ?



[1] http://dev.w3.org/csswg/css3-background/#the-background-position
[2] http://www.w3.org/TR/CSS21/colors.html#background-properties
[3] http://dev.w3.org/csswg/css3-background/#the-background

Received on Thursday, 4 March 2010 23:52:17 UTC