W3C home > Mailing lists > Public > www-style@w3.org > March 2015

Re: [css-grid] How to resolve lines for absolutely positioned grid items

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 26 Mar 2015 10:01:12 -0700
Message-ID: <CAAWBYDA1fzo8f6PXK+Q2BAwxSk46T9vYaBCX+ipz484q2QqJTg@mail.gmail.com>
To: Mats Palmgren <mats@mozilla.com>
Cc: "www-style@w3.org" <www-style@w3.org>
On Thu, Mar 26, 2015 at 2:46 AM, Mats Palmgren <mats@mozilla.com> wrote:
> Thank you for your answers.  I'm looking forward to the next
> revision of the spec.
> I don't think you quite understood the third question though,
> so I'd like to elaborate on that to make it clear what
> the problem is with the spec in this case.
> Let's skip the clamping part and make the question simpler:
> Q4. what is the start and end lines for "grid-column: 1 / 1"
>     for an abs.pos. item in a 3x3 grid?
> http://dev.w3.org/csswg/css-grid/#grid-placement-errors
> The first paragraph says:
> "If grid-row-end/grid-column-end specifies a line at or before
> that specified by grid-row-start/grid-column-start,
> it instead contributes nothing."
> In that sentence I interpret "it instead contributes nothing"
> as "process it the same as if it were 'auto'".
> Is this interpretation correct?

No.  (It's possible it might end up being the same, I dunno, but it's
not the correct way to interpret the spec as currently written.)  A
value of "auto" happens to not contribute anything, but not
contributing anything isn't the same as "auto".

> If so, then we have a problem because 'auto' is special for
> abs.pos. items - it attaches to the container's padding-edge.
> (Fwiw, I think the spec could replace the above with "it instead
> contributes 'span 1'" which should work for both normal flow and
> abs.pos. items.)
>> There are no abspos grid items. ^_^
> http://dev.w3.org/csswg/css-grid/#abspos-items
> The very title of 9.4 is "Absolutely-positioned Grid Items"
> so you started it :-p
> I don't think it's such a bad term.  We need something shorter
> than "an absolutely positioned element who's containing block
> is generated by a grid container".  The spec just needs to state
> clearly that such items do not affect the formation of the
> implicit grid in any way.  I think it's good that the term
> includes "grid item" because much of the spec defines how grid
> items behave.  For example, "Placing Grid Items":
> http://dev.w3.org/csswg/css-grid/#placement
> Why should that chapter apply to abs.pos. if they are not grid
> items?

Yeah, doing this properly requires some careful rewriting to make sure
we catch the things that only apply to grid items vs the things that
also apply to abspos.

> I don't feel strongly about it though - I'll use whatever term
> the spec uses ;-)

How do you feel about the term "grid-anchored" as a shorthand for
that?  I've been informally using the term "positioning anchor" to
refer to the element that an abspos is positioned relative to.

Received on Thursday, 26 March 2015 17:02:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:52:06 UTC