[css-grid] Clamping grid item Automatic Minimum Size isn't working |
||||
Issue descriptionVersion: 56.0.2914.3 (Official Build) dev (64-bit) OS: Linux What steps will reproduce the problem? (1) load the attached testcase (2) (3) What is the expected result? See attached screenshot (from Nightly https://nightly.mozilla.org/) Here's the relevant CSS Grid spec text: https://drafts.csswg.org/css-grid/#min-size-auto "However, if the grid item spans only grid tracks that have a fixed max track sizing function, its automatic minimum size in that dimension is further clamped to less than or equal to the size necessary to fit its margin box within the resulting grid area (flooring at zero)."
,
Nov 18 2016
I would appreciate it if you fix this before enabling Grid by default, because otherwise I suspect it will cause web-compat issues. Thanks.
,
Nov 18 2016
Affects image grid items as well.
,
Nov 18 2016
Here's a link to the image grid item test: https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/reftests/css-grid/grid-item-auto-min-size-clamp-003.html
,
Nov 21 2016
I'm sorry but I'm not sure that's the expected behavior. I've been discussing this with fantasai on GitHub: https://github.com/w3c/csswg-drafts/issues/283#issuecomment-247545477 She says that "stretch" and "start" cases should be different. I'm attaching a simple example where it's clear the difference between Chromium and Firefox. Adding Tab on CC if he wants to clarify the topic.
,
Jan 26 2017
Any update on this?
,
Jan 27 2017
The CSSWG resolution is that, for replaced elements, "nor4mal" equals "start" - that is, no stretching takes places. This is because, for replaced elements, you really want to pay attention to the intrinsic aspect ratio. You don't want to fully stretch, as normal elements do, to the dimensions of the grid area, because it distorts the element. Instead, per WG resolution, we're going to introduce the "contain" keyword to 'width' and 'height', which fills the area while respecting the aspect ratio. But absent that, replaced elements just default to being start/start aligned.
,
Jan 27 2017
This bug is not about replaced elements, that one is bug #666961 . And yeah we need to review and update our implementation there. We didn't do anything regarding "normal" and replaced elements yet. We were waiting for the CSS WG resolution which seems now clear in: https://github.com/w3c/csswg-drafts/issues/523 This bug is about regular elements and implied minimum size. I believe current Chromium behavior is correct given the last comment by fantasai at: https://github.com/w3c/csswg-drafts/issues/283#issuecomment-268125974
,
Feb 25 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/71efe49d24b1154125e1f07e772151794a156265 commit 71efe49d24b1154125e1f07e772151794a156265 Author: rego <rego@igalia.com> Date: Sat Feb 25 15:18:05 2017 [css-grid] Unskip Automatic Implied Minimum Size tests The tests have been updated upstream on csswg-test repository, so we don't need to skip them anymore. There are 2 tests failing out of 18 checking this feature: * 007 & 009: These are related to transferred size of replaced grid items ( crbug.com/555027 ). BUG= 666940 Review-Url: https://codereview.chromium.org/2700623002 Cr-Commit-Position: refs/heads/master@{#453093} [modify] https://crrev.com/71efe49d24b1154125e1f07e772151794a156265/third_party/WebKit/LayoutTests/TestExpectations
,
Mar 2 2017
I've updated the test suite and we're now passing it on Chromium: https://github.com/w3c/csswg-drafts/issues/283#issuecomment-279987986 I believe this is the right behavior, but I might be missing something. Please reopen this if needed. |
||||
►
Sign in to add a comment |
||||
Comment 1 by mpalmg...@mozilla.com
, Nov 18 2016503 bytes
503 bytes View Download