fantasai wrote: > On 09/05/2010 03:58 PM, "Gérard Talbot" wrote: [snip] >> ---------------------- >> >> Author: Ian Hickson >> >> http://test.csswg.org/suites/css2.1/20100815/html4/root-box-003.htm >> >> <title>CSS Test: Styling the root element: display:none (page should be >> a big green expanse)</title> >> >> <style type="text/css"> >> html { display: none; background: green; color: red; } >> >> If it is not supposed to be displayed, then how could it be painted? Why >> should it be painted? >> >> "display of 'none' does not create an invisible box; it creates no box >> at all." >> http://www.w3.org/TR/CSS21/visuren.html#display-prop >> >> I do not think this testcase should be approved. > > This presents an interesting question. The background of the root element > is supposed to be propagated to the canvas; it does not paint on the root > element's box. Hixie's assertion is that it is therefore still painted > even when the root box still exists, which makes sense. > > The interesting question is, where would background images be positioned > if the root box doesn't exist? I don't think this testcase is wrong per > spec, but it does have some interesting implications. > > ~fantasai Any background images has no point from which it can be positioned since the root element has no height. Such a box has infinite width across the canvas but zero height. It exist on the x-axis only. Using this test case, http://css-class.com/test/css/visformatting/root-bfc-icb4a.htm try two things. Give the <html> display:none and then swap the display:none to the <body>. The first test shows similar to Hickson's test. The later test, body {display:none} only shows the border for <html> filling the entire x-axis and it's background-color is propagated to the canvas. The background-image is not present since it is positioned within a zero height root element's box. -- Alan http://css-class.com/ Armies Cannot Stop An Idea Whose Time Has Come. - Victor HugoReceived on Monday, 13 September 2010 05:53:20 UTC
This archive was generated by hypermail 2.4.0 : Friday, 20 January 2023 19:58:15 UTC