Re: Fwd: [css-grid] question on clamping grid items to fixed track size

-------- Forwarded Message --------
Date: Tue, 13 Feb 2018 01:40:17 +0100
From: Mats Palmgren
To: fantasai

On 2/13/18 1:20 AM, fantasai wrote:
 > On 02/12/2018 04:14 PM, Mats Palmgren wrote:
 >> On 2/12/18 10:09 PM, fantasai wrote:
 >>  > No, you're correct. The clamping only applies to the AMS. But it applies
 >>  > to the AMS no matter what constraint the grid is being sized as. Is that
 >>  > making sense now?
 >>
 >> But that means that the issue Rego reported in
 >> https://bugzilla.mozilla.org/show_bug.cgi?id=1427608
 >> is NOT a bug and that the rendering of his testcase in Nightly
 >> is the correct one.
 >
 > Sorry, I got confused about your question; missed the part about the grid
 > item.
 >
 >  > As I understand it, the grid item width, column size, and grid container
 >  > width should all be zero in this case.  Is this correct?
 >
 > Afaict, under the current spec, the column size and grid container
 > width will be zero, but the grid item will be width: 20px, since
 > there is nothing that would reduce its size. (The only thing that
 > would reduce its size from the specified 20px would be a max-width.)
 > (It's AMS would be zero, but the specified width is greater than zero
 > so it uses its specified width.)

OK, I'll check again tomorrow the width:20px case (it's 1:40am here).

However his test in that bug actually has width:auto, so the max-content
size is the width of the "foobar" text.  Let's assume that the item in
that test has justify-self:start to avoid having stretching confuse
the matter.  What is the correct grid item width, column size, and grid
container width in that case?

We currently make the grid container's intrinsic size wide enough to fit
the text (since clamping doesn't affect the max-content size), but
the column size and item width is zero since item's size is clamped under
a min-content/no constraint. (why? it's described in detail in the bug).


/Mats

Received on Monday, 26 March 2018 19:51:37 UTC