Re: [css-grid] Absolutely positioned grid items

Hi again,

thanks for the previous answer, but I'd like to get a further clarification.

It's related to grid descendants (but not direct children) that are
absolutely positioned and their containing block is the grid container.

For example:
<div id="grid" style="display: grid; position: relative;">
  <div id="item">
    <div id="abspos" style="position: absolute;"></div>
  </div>
</div>

In this case "abspos" is not a grid item (as it's not a direct child),
however the containing block is the grid container. Thus, for "abspos"
the containing block will correspond to the padding edges of the grid
container.

However, the grid-placement properties won't apply to "abspos" (as this
is not a grid item). So it'll follow what's explained in "4.3. Static
Position of Grid Container Children" and the behavior described in "8.4.
Absolutely-positioned Grid Items" won't be used.

On the other hand, if the absolute positioned element was the "item",
then if it has non-auto grid-placement properties the behavior in 8.4
will be used.

So I guess that's the reason why there're 2 sections in the spec talking
about this:
* 4.3 will apply to any grid descendant, where the grid containing block
is the grid. Not sure if it'd be nice to be more specefic that this
includes any descendant and not only grid items (direct children).
* 8.4 will apply to grid items (as its title said). Probably we could
change "element" by "grid item" in that section to be more specific.

I'd like just to know if my assumptions are right or not.
What do you think?

Thank you very much,
  Rego

Received on Wednesday, 12 November 2014 21:59:20 UTC