New issue
Advanced search Search tips

Issue 921722 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[css-grid] grid padding reduces available space for abspos inside grid items

Project Member Reported by obru...@igalia.com, Jan 14

Issue description

Chrome Version: 71.0.3578.98
OS: Ubuntu 18.04

What steps will reproduce the problem?
(1) Create a CSS grid with `position: relative; grid: 100px / 100px; padding-left: 20px`
(2) Place a grid item inside it.
(3) Place an abspos element inside the grid item.
(4) Leave the abspos in its static position, but with `grid-column: 1 / 2`
(5) Add two floats inside the abspos, each one with `width: 50px`. Or more generally, any content with total width >80px and <=100px, but which can be broken is parts narrower than <=80px each.

What is the expected result?
The max-content width of the abspos is 50px+50px = 100px, and the grid area is 100px wide, so the abspos has enough space to grow so that the content fits in a single line.

What happens instead?
For some reason, the `padding-left: 20px` of the grid only lets the abspos grow to be 80px wide, so the floats will appear in different lines.

Firefox is also affected. Edge does it correctly.
 
testcase.htm
522 bytes View Download

Comment 1 by obru...@igalia.com, Today (17 hours ago)

Also, getComputedStyle(absolute).left is 20px, it should be 0px

Sign in to add a comment