Re: [css-flexbox] [css-align] unprefixing alignment properties before css-align

On Tue, Jun 18, 2013 at 2:38 PM, Christian Biesinger
<cbiesinger@google.com> wrote:
> On Tue, Jun 18, 2013 at 1:56 PM, Julien Chaffraix <jchaffraix@google.com> wrote:
>> Actually I would rather see the specification mature before we
>> unprefix these properties for several reasons:
>>
>> * align-self has 2 incompatible grammars:
>> Alignment: auto | [ baseline | head | foot | center | stretch ] && true?
>
> I'm not sure where you got that from...? The alignment spec says:
> http://dev.w3.org/csswg/css-align/#align-self-property
> Name:align-self
> Value:auto | stretch | baseline | [ <item-position> && <overflow-position>? ]
>
> And:
>
> <item-position> = center | start | end | self-start | self-end |
>                   flex-start | flex-end | left | right;
>
> So the alignment spec has a superset of values for align-self, which
> is fine - we'll implement them when we implement the alignment spec.

I was reading the WD of Alignment which doesn't match Flexbox. The
editor's draft seems to be consistent (and some of the points you make
were also due to reading an older version).

>> Flexbox: auto | flex-start | flex-end | center | baseline | stretch
>>
>> * The 'true' value is just weird and would be better named something
>> more revealing (e.g. force-positioning)
>
> I agree that it is a weird name but I'm not sure that
> force-positioning is better. Maybe "true-alignment" vs
> "safe-alignment"? That said, since flexbox doesn't use these
> properties, and since changing that name is unlikely to affect the
> subset that flexbox ships, I'm not sure this should be a blocker.

That was just to illustrate that the specification still needs some
discussion. I don't believe this issue only should be a blocker
either.

>> * Some properties with the same values (e.g. align-self: auto,
>> justify-self: auto) have different behaviors based on the type of
>> elements it applies to. This is going to cause confusion when using
>> these properties and values.
>
> justify-self: That's just describing behavior that already exists,
> except for grid. I'm not sure which thing you're objecting to exactly.
> Are you suggesting that grid shouldn't stretch its children by
> default...? Or that abs pos elements should also inherit their justify
> value from the parent's justify-items?

That seems like a poor design to single out specific layouts and have
a different behavior for each of them and that's what I am pointing
out. True that there is a lot of legacy behaviors that needs to be
taken care of but having a single property behaves wildly differently
in different context is bound to confuse people.

>> * justify-self: auto on grid items just stretches the items. I find
>> this weird and I have a hard time understanding what's the use case
>> for it: width: auto (the default) gives you the stretch behavior
>> already.
>
> justify-self gives you inheritance from the parent. justify-items does
> default to stretch. But I think you're assuming a horizontal writing
> mode here...
>
> That said I'm not proposing shipping anything for grid, just for flex.

My big concern is that this proposal impacts more than just flexbox as
this property applies to other layouts. The fact that authors can't
detect which bits of the Alignment specification are implemented saves
us but it does increase the bar to shipping the properties' behavior
for the other layouts. All in all, it isn't as bad as I first thought.

Julien

Received on Wednesday, 19 June 2013 00:00:57 UTC