Re: [css-round-display] part of abs-pos (was: Suggest 'polar-anchor' property for positioning elements without overflowing)

Brad Kemper

On Oct 15, 2015, at 12:59 AM, Jihye Hong <jh.hong@lge.com> wrote:

>> On Oct 9, 2015, at 10:44 AM, Brad Kemper <brad.kemper@gmail.com> wrote:
>> 
>> What I suggested was: don't make 'polar' a separate value of 'position'.
> Instead, let 
>> 'polar-angle' and 'polar-distance' combine with positions absolute, fixed,
> and relative, 
>> in the same way that left, right, top, and bottom do. The effects of left,
> right, top, bottom,
>> polar-angle, and polar-distance would be cumulative, so if you wanted a
> horizontal or vertical
>> offset, you would usually use 'top' and 'left' for that.
> 
> We also had considered about the method similar to your suggestion. 
> But, I'm not sure that the coordination system is decided by the
> polar-related properties not by the position: polar. 

I'm suggesting it could be. 

> When using position: polar, we clearly know that the element is positioned
> based on the center point of the containing block. 

I guess what I am suggesting is that if the value of 'polar-distance' is anything other than 'auto', then the element is positioned based on the center point of the containing block. (Alternative proposal: if the value of 'polar-angle' is anything other than 'auto', then the element is positioned based on the center point of the containing block.)

So it is still being determined by a value, but on a different property than what the draft says. 

Or... introduce 'center' as another property, so that 'center: 50%' would center an element. 

> And there are several polar-related properties and other new properties will
> be suggested.
> When using those properties without position: polar, the base point for
> positioning elements of properties and that in  the normal coordinate system
> (point will be on the upper-left corner of containing block) are different.

No, because 'polar-distance' would not be 'auto' (it could even be 0), and you'd still get to base those properties on polar coordinates. 

Or you have 'center: 50%' cause the centering, 'polar-angle' determine which direction to move it after that, and other 'polar-*' properties determine how/where it moves along that angle. 

> Also, cumulative effects of left, right, top, bottom, polar-angle, and
> polar-distance would be useful for positioning elements.

Exactly my point. You could use them all together. The two versions of my proposal are:

- start at the center (due to 'polar-angle' being non-auto), then move along that angle with 'polar-distance', and horizontally and vertically (additively) with top, right, bottom, left. Conflicts between left and right or between too and bottom are resolved the way they are in position: relative whenever 'polar-angle' is non-auto. 

- Or... If 'center' is non-auto, then it overrides too, left, bottom, and right. Move and/or size the element based on those 5 properties, then move it and additional amount at an angle based on the 'polar-*' properties. 

You could also then use with fixed positioning and relative positioning too. 

Received on Thursday, 15 October 2015 22:51:39 UTC