W3C home > Mailing lists > Public > www-archive@w3.org > March 2018

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

From: Mats Palmgren <fantasai.lists@inkedblade.net>
Date: Mon, 26 Mar 2018 12:45:08 -0700
To: "www-archive@w3.org" <www-archive@w3.org>
Message-ID: <48507419-e907-8e3c-9b0c-2ba32b0bb114@inkedblade.net>
Forwarding off-list discussion to www-archive for future reference.
Swapping out identity to help keep quotations straight...

-------- Forwarded Message --------
Subject: [css-grid] question on clamping grid items to fixed track size
Date: Mon, 12 Feb 2018 04:06:16 +0100
From: Mats Palmgren
To: fantasai

Hello Elika,

Sorry for intruding but I have a question about the Grid spec that I think
is important enough to reach out directly to confirm I understand the spec
correctly.  Here's an example to illustrate:

<style type="text/css">
.grid {
   display: inline-grid;
   grid-template-columns: minmax(auto, 0px);
   border: 2px solid blue;
   margin-bottom: 2px;

.grid div {
   background: grey;
   width: 20px;
   height: 10px;

<div class="grid">

As I understand it, the grid item width, column size, and grid container
width should all be zero in this case.  Is this correct?

The text about clamping grid items in §6.6 says:
"... its specified size and content size in that dimension (and the input
to the transferred size in the other dimension) are further clamped ..."

20px qualifies as a "specified size" here and should be clamped to zero.

I'm assuming that the clamping in §6.6 occurs regardless of whether
we're sizing the grid container under a min-content constraint,
max-content constraint, or no constraint.  Is this correct?

I'm also assuming that the clamping in §6.6 occurs regardless of the value
of justify-/align-self.  Is this correct?

(I'm working on https://bugzilla.mozilla.org/show_bug.cgi?id=1427608
and I find that Chrome also has bugs in this area.)

Received on Monday, 26 March 2018 19:45:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:35:51 UTC