W3C home > Mailing lists > Public > www-style@w3.org > April 2011

Re: canvas origin?

From: Alan Gresley <alan@css-class.com>
Date: Fri, 08 Apr 2011 23:29:02 +1000
Message-ID: <4D9F0D9E.6080108@css-class.com>
To: Anton Prowse <prowse@moonhenge.net>
CC: www-style@w3.org, Jack Smiley <zxcv_890@hotmail.com>
On 8/04/2011 6:44 AM, Anton Prowse wrote:
> On 07/04/2011 22:14, Anton Prowse wrote:
>> On 04/04/2011 23:19, Jack Smiley wrote:
>>>
>>> Referring to section 10.1 Definition of "containing block",
>>>
>>> "For continuous media, [the ICB] has the dimensions of the viewport
>>> and is anchored at the canvas origin..."
>>>
>>> I
>>> don't see the term "canvas origin" defined anywhere in the spec.


http://www.w3.org/Style/css2-updates/draft-PR-CSS21-201103XX/intro.html#canvas

   | For all media, the term canvas describes "the space where the
   | formatting structure is rendered." The canvas is infinite for
   | each dimension of the space, but rendering generally occurs
   | within a finite region of the canvas, established by the user
   | agent according to the target medium. For instance, user agents
   | rendering to a screen generally impose a minimum width and
   | choose an initial width based on the dimensions of the viewport.


>>> Where
>>> is the canvas origin and what is the implication of having the ICB
>>> anchored to it?
>>
>> 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.
>
>> This should probably be made a little clearer in the spec.
>
> ;-)
>
>
> Cheers,
> Anton Prowse
> http://dev.moonhenge.net


The canvas origin is not just one point (marked by the 'X' below). It is 
the top and left edges of the viewport in LTR flow and top and right 
edges of the viewport in LTR flow. They are the edges where overflowing 
content is either visible (rendered) or hidden (not rendered).


           |
   hidden  |        hidden-y
           |
----------X----------------------|-------------
           |                      |
  hidden-x |  visible / viewport  | overflow-x
           |                      |
           |----------------------|-------------
           |                      |
           |      overflow-y      |  oveflow
           |                      |




The ICB is higher than the height of the or wider than the width of the 
viewport under the below scenarios.


<html style="height: 100%">
   <body style="height: 100%">
     <div style="min-height: 100%"> with content that is longer than the 
height of the viewport </div>
   </body>
</html>

<html>
   <body style="width: 120%"></body>
</html>



-- 
Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
Received on Friday, 8 April 2011 13:29:32 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:39 GMT