Re: [css-round-display] Percentages of 'polar-distance' when origin is not the center of the containing block

> On Jan 22, 2016, at 03:28, Brad Kemper <brad.kemper@gmail.com> wrote:
> 
> 
> 
>> On Jan 20, 2016, at 11:01 PM, Jihye Hong <jh.hong@lge.com> wrote:
>> 
>> There is an action item[1] of CSS Round display from the last F2F meeting in
>> Sapporo. It is about clarifying 'polar-distance' percentages when origin is
>> not the center.
>> 
>> There could be 2 options for the definition of percentages : 
>> 
>>   1. relative to the shortest distance between the origin of polar
>> coordinates and edges of containing block.
>>   2. relative to the distance from the origin of polar coordinates to
>> edges of containing block.
> 
> #2 is as measured along the ray of the angle, right? That one seems more useful to me (though the language would need to change if we use alignment properties instead of polar origin).

Agreed.

>> Because of the fact that origin is not the center, the distance between the
>> origin of polar coordinates and the edge of containing block vary according
>> to the 'polar-angle' value.
>> 
>> In the first option, the 'polar-distance' value given by percentages is
>> constant no matter which value the 'polar-angle' has.
>> This case is satisfied with the directional consistency and avoiding
>> circular dependency.
> 
> Can you give an example of when circular dependency is an issue?

I don't see the dependency either. Option 1 seems less useful to me,
but I don't see what makes it difficult to define.

>> Otherwise, in the second option, the 'polar-distance' value given by
>> percentages is affected by the value of 'polar-angle'.
>> I think this may be useful for general usecases such as aligning elements in
>> the egg-shape.
> 
> Agreed. I think you would need to add something about that length depending upon the border-radii (and maybe shape-inside or shape-outside) of the containing block. One would want to be able to follow the curve with many elements (such as clock numerals or minute markers) at the same distance from the curve. 

Right. And if we go with shapes inside and outside (which I think we should), we should also think about how it interacts with shape-padding and shape-margin.

In addition, and this is probably more tricky, given that "polar-distance 100%" (or "100% contain") is meant to avoid overflow, and is meant to be used with "transform: rotate(polar-angle)", we should probably consider how these polar distance in percentage and (some?) transforms. In another mail, you suggested that we use "transform: translate(...)" as a substitute for polar-anchor. If it works out (and that doesn't sound crazy), then that reinforces the importance of that question.

 - Florian

Received on Friday, 22 January 2016 01:21:52 UTC