Re: [css-shapes] Positioning <basic-shapes> summary, v2

On 10/29/2013 08:17 PM, Alan Stearns wrote:
> On 10/29/13 7:45 PM, "fantasai" <fantasai.lists@inkedblade.net> wrote:
>>
>> Also, svg- doesn't give me any indication that the functional
>> difference between the two is in how percentages are interpeted.
>> So it doesn't really solve the stated problem. :)
>
> I humbly suggest that while I may have been too close to the presence or
> lack of the 'at' keyword, you might be too accustomed to the background
> positioning syntax to see the value in a simple SVG-style shape. I fully
> expect that for those using ( x y w h ) to describe a rectangle, there
> will be no confusion about where a 25% value for the x component positions
> the rectangle. I think that providing ( x y w h ) for the very simple case
> is worthwhile, particularly since the syntax will be used in both CSS and
> SVG.
>
> I do agree that using <new-position> is also worthwhile. I just don't
> think it needs to replace the simpler SVG syntax.

SVG doesn't have an ordered set of arguments, it has an unordered
one. So the ordering x y w h is not an SVG convention, although it
might be a convention elsewhere.

If it's something that's really wanted -- to put four arguments in
exactly that order -- then I'd suggest to adopt the Media Fragments
convention and call it xywh().

>> The best I can come up with is giving the position as
>>
>>    [[top|bottom] & [left|right]]? at <position>
>>
>> where the first part (e.g. "top left") says what point you're anchoring
>> at the given position, defaulting to background-position rules.
>>
>> So
>>    rectangle(50px 50px at 50%)
>> would center a 50px square inside the box whereas
>>    rectangle(50px 50px top left at 50%)
>> would pin the top left corner of the square at the center of the box.
>
> It makes me slightly unhappy because it's more complicated than ( x y w h
> ). But I'm more weirded out that it introduces the same keywords to the
> left at right of the 'at' keyword.

I can't say I'm entirely thrilled with it either. :)

>     rectangle(50px 50px top left at top 10px right 10px)
>
> I think this is useful, but it's difficult for me to read. Would we want
> to add 'center' to both of the keywords on the left of the 'at'?

Yeah, I guess we could add 'center' before the at, which would
allow positioning rectangles by their centerpoint, like ellipses.

~fantasai

Received on Wednesday, 30 October 2013 16:58:30 UTC