Thierry Koblentz wrote:
Hi Philippe,
No, not really. The spec is about both.
Unless the root element has a background, the background is propagated
to the viewport. If no background-repeat is specified, the image will
then be painted all over the space/canvas. If background-repeat is
specified (no-repeat), the space created by <body> (it's computed
height) will be used for background-position - the root element is not
taller than the body element, unless a height on the root element is
specified.
see 4th paragraph under 'The background':
http://www.w3.org/TR/CSS21/colors.html#background
This part below makes a lot of sense regarding how browsers paint a
positioned background when there is no background for <html>.
If background-repeat is specified (no-repeat), the space created by <body>
(it's computed
height) will be used for background-position
But are you quoting the spec? Because I can't find the above in that section
(14.2).
I can't find any mention of "background-repeat" in these 4 paragraphs.
Actually, what I find in there is kind of confusing (may be *you* should
write the spec ;)
"Such backgrounds must also be anchored at the same point as they would be
if they were painted only for the root element."
--
Regards,
Thierry
www.tjkdesign.com | www.ez-css.org | @thierrykoblentz
The parts of the specs that are relevant are 'The Background' [1],
'The Canvas' [2], The Viewport [3] and either heights and margins for
Block-level non-replaced elements in normal flow when 'overflow'
computes to 'visible' [4] or Auto heights for block formatting roots [5].
Also there is a question on the CSS WG list by dbaron [6] which
started a small thread there where I added this [7] along with some
test cases [8]. Gecko does something different to Webkit, Opera and
IE8. IE7- shows the bug regarding background-position and the y-axis
from the thread on this list.
1. <http://www.w3.org/TR/CSS21/colors.html#background>
2. <http://www.w3.org/TR/CSS21/intro.html#canvas>
3. <http://www.w3.org/TR/CSS21/visuren.html#viewport>
4. <http://www.w3.org/TR/CSS21/visudet.html#normal-block>
5. <http://www.w3.org/TR/CSS21/visudet.html#root-height>
6. <http://lists.w3.org/Archives/Public/www-style/2010Aug/0539.html>
7. <http://lists.w3.org/Archives/Public/www-style/2010Aug/0553.html>
8. <http://css-class.com/test/css/visformatting/root-bfc-icb1.htm>
--
Alan http://css-class.com/
Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/