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

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.

~TJ

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