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

> On 16 Oct 2015, at 15:25, Brad Kemper <> wrote:
>> but I seems that percentage polar distances would only makes sense when used with absolutely/fixed positioned element, not with relative, so we'd probably have to make them the same as 0 in that case. Which is probably fine. Or did you mean something else?
> Hmm. I hadn't given that much thought. I would expect it to be consistent with top, right, bottom, left, which apparently use percentages the same way as absolutely positioning, as a percentage of the containing block (although I've never personally needed to use rel-pos that way). So I guess I'd measure what the polar-distance would be if it was abs-pos, and then move it that much.
> But that's more of a "purity" consideration than a practical one, from where I stand. Otherwise I don't feel strongly about it yet.

Right. percentage on polar distance on a relative element don't sounds like something you would actually want to use, so as long as we have a definition, I don't care strongly what it is.

>>> Or... introduce 'center' as another property, so that 'center: 50%' would center an element. 
>> That sounds more confusing, and not obviously more useful.
> Does it? OK. Well, it would be useful in general to be able to abs-pos center an element, or even just position an element anywhere by the center of the element, instead of by the edges. And even to have 'center' be a shorthand for 'center-x' and 'center-y' (or logical equivalent). So this is really a whole other thing, but if we had it, then it would fit nice with the idea of then applying 'polar-*' measurements  (and maybe trbl measurements too) from that point without further need for a way to measure coordinates from the center. 
> I realize this would expand the scope of what this spec is trying to accomplish. But I think it would be pretty useful beyond round displays in a way that still works well with round displays.

#foo {
  polar-distance: 0;
} /* Bam! it's centered. */

#bar {
  polar-distance: 0;
  left: 30px;
} /* Bam! offset from the center. */

That seems like a pretty straightforward way to do what you're suggesting.

On the other hand, the meaning of the following is a lot left obvious to me.

#baz {
  center: 42%;

even if you expand to center-x:42% and center-y:42%, it's still feels weird.
First, it is not obvious that this moves the center, rather than sizing it
(what could that mean?) or doing some other thing. Even if you get other than,
it is moving the center by 42% of what, from where, in which direction?

You also have to guess similar things with polar-distance, but at least
to me, the answers are much more obvious.

 - Florian

Received on Friday, 16 October 2015 14:03:10 UTC