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

On 10/30/13 10:30 AM, "fantasai" <fantasai.lists@inkedblade.net> wrote:

>On 10/30/2013 10:08 AM, Chris Lilley wrote:
>>
>>> One complication is that percentage values for SVG-style x and y are
>>> interpreted differently than percentage values in the corresponding
>>> components of the <new-position> syntax.
>>
>> That argues for keeping what we have so that people (who are
>> increasingly familiar with SVG) can build on their knowledge there
>> rather than having to remember that in CSS, shapes behave sort of
>> differently sometimes.
>
>Well there's several issues here:
>
>   1. Syntax of the functional notation's internals
>        a. Use 4 consecutive lengths (x y w h)
>        b. Use radial-gradient syntax (w h at x y)

I don't think this change makes sense unless we're using <new-position> in
place of x y. The keyword is only necessary if we have to disambiguate
among the <new-position> variants.

>
>   2. Interpretation of percentages for rectangles
>        a. position top-left corner
>           (100%, 100% puts top-left of rectangle
>            in bottom right corner of box)
>        b. using background-position scheme
>           (100%, 100% puts bottom-right of rectangle
>            in bottom right corner of box)

This is the main problem, IMO. There are proponents of both percentage
positioning schemes, and I don't see one clear answer. But I do believe
that those who prefer 2.a. also prefer x,y over <position>, and those who
prefer 2.b. prefer <position> over x,y. That's one reason I've proposed
two sets of basic shape functions.

>
>   3. Using <position> vs [<length>|<percentage>]{2}
>        a. Use <position>, like background-position and
>           radial-gradients do
>        b. Use [<length>|<percentage>]{2} in a way
>           that prevents expansion into <position> later
>        c. Use [<length>|<percentage>]{2} in a way
>           that can extend into <position> later
>
>      Note: b. does not extend well to handle i18n requests
>            like using start/end keywords

And I'd like to support 3.a. (or at least a <new-position> without the
3-argument variant) in an extensible way in a separate set of functions
(or keywords in a new shape() function). Let's have both the current
simple functions for SVG compatibility, and an extensible design for CSS
compatibility. The simple set can stay as they are, and new bells and
whistles we define for CSS positioning can be added to the extensible
design.

Thanks,

Alan

Received on Wednesday, 30 October 2013 17:49:22 UTC