Re: [css-round-display] Add 'auto' to 'polar-anchor' and make it as initial value

On 04/22/2016 12:28 AM, Brad Kemper wrote:
>
> Brad Kemper
> On Apr 21, 2016, at 1:56 AM, Jihye Hong <jh.hong@lge.com> wrote:
>
>>> You aren't really changing the coordinate system of either the element or
>>> its containing block. '50% 50%' still refers to halfway across and down
>>> from the zero point on the left top. And all other properties continue to
>>> use Cartesian coordinates too. 'Polar-distance' and 'polar-angle' are
>>> simply an additional transformation from where 'polar-anchor' puts it.
>>>
>>> Polar-anchor:0 0 would put the element's center into the top left corner
>>> of the containing block.
>> When you specify 'polar-distance' or 'polar-angle' on the element, it means
>> that the element will be positioned in polar coordinates.
>> By default, the element's center is put into the center of the containing
>> block
>
> I think it would be much more intuitive to have 'polar-origin' be the
> property that puts it in the center of the containing block, since
> it's value of 50% 50% is what would put it in the center anyway. Then
> 'auto' can just work the same as it does in top/right/bottom/left (does
> not center).
>
> Thus we can say that 'polar-origin' does nothing for 'position:relative',
> while 'polar-angle' and 'polar-distance' works the same for all non-static
> positions. Non-auto 'polar-angle' or 'polar-distance' would not cause any
> extra centering to automatically occur; 'polar-origin' would handle it all
> by itself.
>
>> for polar positioning.
>
> Those three words are unnecessary. For all non-static positioning
> (relative, absolute, or fixed), 'polar-angle' and 'polar-distance'
> would move the element the specified distance along the specified
> angle. If 'polar-origin' had a non-auto value, it would first put
> the center of the element at the specified (Cartesian) point in
> the containing block. That is simple and easy to understand,
> without asking anyone to reorient themselves to a different
> coordinate system, or to wonder what a different coordinate system
> might mean to other properties that use x and y (it means nothing:
> even 'polar-origin' is still measured from the top left corner in
> the current spec).

Yes, this is what we resolved in Sydney.
   https://www.w3.org/mid/CADhPm3vMBw7=BkNExR70GbasbfQSCYted+pSz8atu2ecdjZ5Ow@mail.gmail.com

>> 'polar-anchor:0 0' would put the element's upper left corner into the center
>> of the containing block when you give a value as '50% 50%' for
>> 'polar-origin'.
>
> Yes that makes some sense. A different way to do it would be to have
> 'polar-anchor:0 0' be the center of the element. Positive amounts
> would move the anchor towards the right/bottom, while negative amounts
> would move the anchor towards the left/top. This would have the same
> general effect as polar-anchor does already, except it would not need
> an 'auto' value. 'polar-anchor:0 0' would just always mean "don't
> move the origin at all" (from its default of "center of the element",
> which is where it starts when 'polar-origin' is non-auto).
> 'polar-anchor:10px -50%' would mean "move the origin 10px to the
> right, and 50% of its height towards the top."

While I'm sympathetic to this design, I think we should keep consistency
with transform-origin and background positioning here. So 0 0, IIRC,
would represent the top left corner.

> Of course, this then has EXACTLY THE SAME effect as 'transform:
> translate(tx,ty)', where tx and ty are the polar-anchor values
> specified, but multiplied by -1.

Yes, I'm not yet convinced polar-anchor is necessary.

~fantasai

Received on Wednesday, 27 April 2016 13:43:25 UTC