W3C home > Mailing lists > Public > www-style@w3.org > September 2014

Re: [css-align][css-grid] IE's interpretation of stretch?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 16 Sep 2014 14:27:39 -0700
Message-ID: <CAAWBYDBOwgVF7cBr0F2x+hdAAR1iNRy+XscuoX3LUUUM5QJUXA@mail.gmail.com>
To: Fran├žois REMY <francois.remy.dev@outlook.com>
Cc: CSS WG <www-style@w3.org>
On Tue, Sep 16, 2014 at 1:57 PM, Fran├žois REMY
<francois.remy.dev@outlook.com> wrote:
>> Yes, 'stretch' doesn't do anything if the item is
>> larger than the area, which is why IE renders
>> the way it does.
>
> Thanks, this is much clearer than the spec.

Hmm, it should be exactly what the spec says.  Can I fix the spec to
be clearer somehow?

>> Yes, our handling of clamping is not great right now.
>> Obviously things need to get clamped in the middle
>> there, so that if a max-* prevents it from reaching
>> its full stretched size, it should still stretch as much
>> as possible, and then start-align.
>>
>> I'll add an issue on it for now.
>
> That slightly bothers me, though. I can clearly see cases where you would want to center the element if it can't grow to fit, and not start-align it.

This is basically just copied from Flexbox; no one's asked for
fallback values yet.

> I guess you could still use auto margins to achieve this, though (however, would it work vertically?).

Margin handling is defined per-layout-mode.  In Flexbox and Grid,
though, auto margins win over 'stretch', so your item wont' be
stretched at all if you use auto margins for alignment.

~TJ
Received on Tuesday, 16 September 2014 21:28:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:46 UTC