Re: canvas origin?

On 9/04/2011 6:22 AM, Sylvain Galineau wrote:
> [Tab Atkins:]
>>>> 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.
>>>>
>>> I'm interested in understanding why the canvas origin needs to be
>>> defined to change with direction. What properties depend on this switch
>> ?
>>
>> If the ICB is wider than the viewport, the excess has to overflow the
>> viewport in one direction or another.  You want it to overflow to the
>> right in ltr, and to the left in rtl.
>
> Check. It's the overflow origin, really. Thanks.


Yes, one direction of overflow is hidden, the other direction is visible.

For LTR we have this.


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


For RTL we have this.


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


By adjusting the viewport height or width, we can either causes more 
overflow or less overflow (even no overflow).



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

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo

Received on Friday, 8 April 2011 20:57:52 UTC