Re: canvas origin?

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 UTC