New issue
Advanced search Search tips

Issue 619047 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jun 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

[css-grid] Positioned items resolve percentage sizes against grid container.

Project Member Reported by jfernan...@igalia.com, Jun 10 2016

Issue description

The Grid Layout specification states the following when describing the absolute positioned grid item's behavior:

"If an absolutely positioned element’s containing block is generated by a grid container, the containing block corresponds to the grid area determined by its grid-placement properties." 

Hence, when an absolute positioned grid item has a percentage value for
any of its sizing properties, it should be resolved against the grid
cell.

The attached test case shows that absolute positioned elements resolve
the percentage sizes against the grid container. 
 
positioned-percent-width.html
948 bytes View Download

Comment 1 by r...@igalia.com, Jun 10 2016

Status: WontFix (was: Untriaged)
This is not a bug, as the "auto" lines work quite different for positioned items.

From the spec (https://drafts.csswg.org/css-grid/#abspos-items):
"Instead of auto-placement, an auto value for a grid-placement property contributes a special line to the placement whose position is that of the corresponding padding edge of the grid container (the padding edge of the scrollable area, if the grid container overflows). These lines become the first and last lines (0th and -0th) of the augmented grid used for positioning absolutely-positioned items."

You can find a detalied explanation at:
https://blogs.igalia.com/mrego/2016/05/27/css-grid-layout-and-positioned-items/#positioned-items-and-auto-lines

Sign in to add a comment