New issue
Advanced search Search tips

Issue 602670 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocking:
issue 79180



Sign in to add a comment

[css-grid] Issue with alignment and content distribution

Project Member Reported by r...@igalia.com, Apr 12 2016

Issue description


If we use content distribution (with "space-around" and that kind of values) and we align one item with "center" and/or "end".
The item uses the space added by the content distribution, but it shouldn't use it.

Attached example showing the issue, check it live at:
http://jsbin.com/doyole/1/edit?html,css,output
 
issue-content-distribution-alignment.html
513 bytes View Download
issue-content-distribution-alignment-current.png
2.1 KB View Download
issue-content-distribution-alignment-expected.png
2.3 KB View Download

Comment 1 by r...@igalia.com, Apr 12 2016

Owner: r...@igalia.com
Status: Assigned (was: Available)
The fix is pretty simple (http://sprunge.us/WRCK?diff), I'll create a CL with some tests.
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 18 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/60d690dfa729305930f3e8a387abb6da6d6146a0

commit 60d690dfa729305930f3e8a387abb6da6d6146a0
Author: rego <rego@igalia.com>
Date: Mon Apr 18 11:18:59 2016

[css-grid] Fix alignment with content distribution

We were only subtracting the distribution offset for items spanning
several tracks, but not for items in a single cell.
We should actually subtract the offset in that situation too,
the same that we do for the grid gaps.

Created new test and renamed the old one as it was only testing
items spanning several cells.

BUG= 602670 
TEST=fast/css-grid-layout/grid-content-alignment-and-self-alignment.html

Review URL: https://codereview.chromium.org/1880393005

Cr-Commit-Position: refs/heads/master@{#387888}

[rename] https://crrev.com/60d690dfa729305930f3e8a387abb6da6d6146a0/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-content-alignment-and-self-alignment-spanning-expected.txt
[add] https://crrev.com/60d690dfa729305930f3e8a387abb6da6d6146a0/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-content-alignment-and-self-alignment-spanning.html
[modify] https://crrev.com/60d690dfa729305930f3e8a387abb6da6d6146a0/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-content-alignment-and-self-alignment.html
[modify] https://crrev.com/60d690dfa729305930f3e8a387abb6da6d6146a0/third_party/WebKit/Source/core/layout/LayoutGrid.cpp

Comment 3 by r...@igalia.com, Apr 18 2016

Status: Fixed (was: Assigned)

Sign in to add a comment