- From: Anton Prowse <prowse@moonhenge.net>
- Date: Sat, 09 Apr 2011 02:12:34 +0200
- To: www-style@w3.org
- CC: Jack Smiley <zxcv_890@hotmail.com>
On 08/04/2011 18:50, Jack Smiley wrote: > >> On 07/04/2011 22:14, Anton Prowse wrote: > >>> I suppose the canvas origin is where the top-left corner of the margin >>> area box of the root element would be if it had position:static, and the >>> ICB's top-left corner is incident with that point. >> >> That was rather careless. How about: ...if it had position:static and >> non-auto margin-left, in ltr mode; and in rtl mode it's the top-right >> corners and margin-right that we consider. [And float:none, of course!] > Thank > you for your response. I'm not clear about your stipulation about > margin-left having to be "non-auto". Can you explain what you mean by > this? Auto horizontal margins cause difficulties, since (for example) if both left and right margins are auto then the root element is horizontally centered within the viewport, making it cumbersome to define the canvas origin if the root element has a width specified. Hence it's easier to define the canvas origin under the assumption that the margin is not auto. > By saying "non-auto", are you implying that it's > permissible for the left-margin property of the html element to be > specified as any positive or negative number, so that the canvas origin > would then be wherever the top-left corner of the html (root) block is? Depends what you mean by that; I was careful to say the corner of _the margin box_ of the root element. > (assuming ltr mode) For example, if I do html: {margin-left: -50px}, > would the canvas origin be 50px to the left of the top left corner of > the viewport? No. It would (as always, by definition) be incident with the top left corner of the initial containing block, which is typically the rectangle seen in the viewport when the page loads. The leftmost 50px of the root element's margin area box would be to the left of the initial containing block (and usually impossible to scroll left to in browsers, although that's not mandated anywhere AFAIK). >>> This should probably be made a little clearer in the spec. > > I agree. How can we make that happen? It's enough that this conversation is taking place on this mailing list to ensure that it'll be considered for the Errata to the upcoming publication of CSS21 as a Proposed Recommendation. Cheers, Anton Prowse http://dev.moonhenge.net
Received on Saturday, 9 April 2011 00:13:02 UTC