-
Notifications
You must be signed in to change notification settings - Fork 707
[css-grid] Is baseline shim used in the minimum contribution? #3660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
In fact Chromium and Edge don't include the shim if the row is sized with |
Related with the previous comment, https://drafts.csswg.org/css-grid/#content-based-minimum-size says
Is the shim taken into consideration when subtracting the margins in order to calculate the stretch fit? |
Before this patch, the shim used for baseline alignment is not taken into consideration when calculating the minimum contribution of a grid item if its preferred size is auto, its minimum size is auto, and the max track sizing function is a fixed small value. In this case, the auto minimum size can produce a smaller track than if it was 0. The specification needs to clarify how baseline shims interact with minimum contributions (w3c/csswg-drafts#3660), but the above doesn't make sense. BUG=934535 TEST=external/wpt/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim.html Change-Id: Iafd194ab7e5656b5018e0e36b915ba183bdedd19
Before this patch, the shim used for baseline alignment is not taken into consideration when calculating the minimum contribution of a grid item if its preferred size is auto, its minimum size is auto, and the max track sizing function is a fixed small value. In this case, the auto minimum size can produce a smaller track than if it was 0. The specification needs to clarify how baseline shims interact with minimum contributions (w3c/csswg-drafts#3660), but the above doesn't make sense. BUG=934535 TEST=external/wpt/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim.html Change-Id: Iafd194ab7e5656b5018e0e36b915ba183bdedd19
Before this patch, the shim used for baseline alignment is not taken into consideration when calculating the minimum contribution of a grid item if its preferred size is auto, its minimum size is auto, and the max track sizing function is a fixed small value. In this case, the auto minimum size can produce a smaller track than if it was 0. The specification needs to clarify how baseline shims interact with minimum contributions (w3c/csswg-drafts#3660), but the above doesn't make sense. BUG=934535 TEST=external/wpt/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim.html Change-Id: Iafd194ab7e5656b5018e0e36b915ba183bdedd19
Before this patch, the shim used for baseline alignment is not taken into consideration when calculating the minimum contribution of a grid item if its preferred size is auto, its minimum size is auto, and the max track sizing function is a fixed small value. In this case, the auto minimum size can produce a smaller track than if it was 0. The specification needs to clarify how baseline shims interact with minimum contributions (w3c/csswg-drafts#3660), but the above doesn't make sense. BUG=934535 TEST=external/wpt/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim.html Change-Id: Iafd194ab7e5656b5018e0e36b915ba183bdedd19 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1481512 Commit-Queue: Oriol Brufau <obrufau@igalia.com> Reviewed-by: Manuel Rego <rego@igalia.com> Reviewed-by: Javier Fernandez <jfernandez@igalia.com> Cr-Commit-Position: refs/heads/master@{#637299}
Before this patch, the shim used for baseline alignment is not taken into consideration when calculating the minimum contribution of a grid item if its preferred size is auto, its minimum size is auto, and the max track sizing function is a fixed small value. In this case, the auto minimum size can produce a smaller track than if it was 0. The specification needs to clarify how baseline shims interact with minimum contributions (w3c/csswg-drafts#3660), but the above doesn't make sense. BUG=934535 TEST=external/wpt/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim.html Change-Id: Iafd194ab7e5656b5018e0e36b915ba183bdedd19 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1481512 Commit-Queue: Oriol Brufau <obrufau@igalia.com> Reviewed-by: Manuel Rego <rego@igalia.com> Reviewed-by: Javier Fernandez <jfernandez@igalia.com> Cr-Commit-Position: refs/heads/master@{#637299}
Before this patch, the shim used for baseline alignment is not taken into consideration when calculating the minimum contribution of a grid item if its preferred size is auto, its minimum size is auto, and the max track sizing function is a fixed small value. In this case, the auto minimum size can produce a smaller track than if it was 0. The specification needs to clarify how baseline shims interact with minimum contributions (w3c/csswg-drafts#3660), but the above doesn't make sense. BUG=934535 TEST=external/wpt/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim.html Change-Id: Iafd194ab7e5656b5018e0e36b915ba183bdedd19 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1481512 Commit-Queue: Oriol Brufau <obrufau@igalia.com> Reviewed-by: Manuel Rego <rego@igalia.com> Reviewed-by: Javier Fernandez <jfernandez@igalia.com> Cr-Commit-Position: refs/heads/master@{#637299}
https://bugs.webkit.org/show_bug.cgi?id=195964 Patch by Oriol Brufau <obrufau@igalia.com> on 2019-03-20 Reviewed by Javier Fernandez. LayoutTests/imported/w3c: Import WPT tests. * web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-expected.txt: Added. * web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-lr-expected.txt: Added. * web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-lr.html: Added. * web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-rl-expected.txt: Added. * web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-rl.html: Added. * web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim.html: Added. * web-platform-tests/css/css-grid/layout-algorithm/w3c-import.log: Source/WebCore: Tests: imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-lr.html imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-rl.html imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim.html Before this patch, the shim used for baseline alignment is not taken into consideration when calculating the minimum contribution of a grid item if its preferred size is auto, its minimum size is auto, and the max track sizing function is a fixed small value. In this case, the auto minimum size can produce a smaller track than if it was 0. The specification needs to clarify how baseline shims interact with minimum contributions (w3c/csswg-drafts#3660), but the above doesn't make sense. * rendering/GridTrackSizingAlgorithm.cpp: (WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
… for the minimum contribution, a=testonly Automatic update from web-platform-tests [css-grid] Always consider baseline shim for the minimum contribution Before this patch, the shim used for baseline alignment is not taken into consideration when calculating the minimum contribution of a grid item if its preferred size is auto, its minimum size is auto, and the max track sizing function is a fixed small value. In this case, the auto minimum size can produce a smaller track than if it was 0. The specification needs to clarify how baseline shims interact with minimum contributions (w3c/csswg-drafts#3660), but the above doesn't make sense. BUG=934535 TEST=external/wpt/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim.html Change-Id: Iafd194ab7e5656b5018e0e36b915ba183bdedd19 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1481512 Commit-Queue: Oriol Brufau <obrufau@igalia.com> Reviewed-by: Manuel Rego <rego@igalia.com> Reviewed-by: Javier Fernandez <jfernandez@igalia.com> Cr-Commit-Position: refs/heads/master@{#637299} -- wpt-commits: c00bf09575cac952e206c2a7025ee7c84971180f wpt-pr: 15511
… for the minimum contribution, a=testonly Automatic update from web-platform-tests [css-grid] Always consider baseline shim for the minimum contribution Before this patch, the shim used for baseline alignment is not taken into consideration when calculating the minimum contribution of a grid item if its preferred size is auto, its minimum size is auto, and the max track sizing function is a fixed small value. In this case, the auto minimum size can produce a smaller track than if it was 0. The specification needs to clarify how baseline shims interact with minimum contributions (w3c/csswg-drafts#3660), but the above doesn't make sense. BUG=934535 TEST=external/wpt/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim.html Change-Id: Iafd194ab7e5656b5018e0e36b915ba183bdedd19 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1481512 Commit-Queue: Oriol Brufau <obrufau@igalia.com> Reviewed-by: Manuel Rego <rego@igalia.com> Reviewed-by: Javier Fernandez <jfernandez@igalia.com> Cr-Commit-Position: refs/heads/master@{#637299} -- wpt-commits: c00bf09575cac952e206c2a7025ee7c84971180f wpt-pr: 15511
Clarified that the minimum contribution is a type of intrinsic size contribution. |
Before this patch, the shim used for baseline alignment is not taken into consideration when calculating the minimum contribution of a grid item if its preferred size is auto, its minimum size is auto, and the max track sizing function is a fixed small value. In this case, the auto minimum size can produce a smaller track than if it was 0. The specification needs to clarify how baseline shims interact with minimum contributions (w3c/csswg-drafts#3660), but the above doesn't make sense. BUG=934535 TEST=external/wpt/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim.html Change-Id: Iafd194ab7e5656b5018e0e36b915ba183bdedd19 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1481512 Commit-Queue: Oriol Brufau <obrufau@igalia.com> Reviewed-by: Manuel Rego <rego@igalia.com> Reviewed-by: Javier Fernandez <jfernandez@igalia.com> Cr-Commit-Position: refs/heads/master@{#637299}
… for the minimum contribution, a=testonly Automatic update from web-platform-tests [css-grid] Always consider baseline shim for the minimum contribution Before this patch, the shim used for baseline alignment is not taken into consideration when calculating the minimum contribution of a grid item if its preferred size is auto, its minimum size is auto, and the max track sizing function is a fixed small value. In this case, the auto minimum size can produce a smaller track than if it was 0. The specification needs to clarify how baseline shims interact with minimum contributions (w3c/csswg-drafts#3660), but the above doesn't make sense. BUG=934535 TEST=external/wpt/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim.html Change-Id: Iafd194ab7e5656b5018e0e36b915ba183bdedd19 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1481512 Commit-Queue: Oriol Brufau <obrufauigalia.com> Reviewed-by: Manuel Rego <regoigalia.com> Reviewed-by: Javier Fernandez <jfernandezigalia.com> Cr-Commit-Position: refs/heads/master{#637299} -- wpt-commits: c00bf09575cac952e206c2a7025ee7c84971180f wpt-pr: 15511 UltraBlame original commit: 78f7e0538669df28260b7c0a21a1db61e2688fe5
… for the minimum contribution, a=testonly Automatic update from web-platform-tests [css-grid] Always consider baseline shim for the minimum contribution Before this patch, the shim used for baseline alignment is not taken into consideration when calculating the minimum contribution of a grid item if its preferred size is auto, its minimum size is auto, and the max track sizing function is a fixed small value. In this case, the auto minimum size can produce a smaller track than if it was 0. The specification needs to clarify how baseline shims interact with minimum contributions (w3c/csswg-drafts#3660), but the above doesn't make sense. BUG=934535 TEST=external/wpt/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim.html Change-Id: Iafd194ab7e5656b5018e0e36b915ba183bdedd19 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1481512 Commit-Queue: Oriol Brufau <obrufauigalia.com> Reviewed-by: Manuel Rego <regoigalia.com> Reviewed-by: Javier Fernandez <jfernandezigalia.com> Cr-Commit-Position: refs/heads/master{#637299} -- wpt-commits: c00bf09575cac952e206c2a7025ee7c84971180f wpt-pr: 15511 UltraBlame original commit: 78f7e0538669df28260b7c0a21a1db61e2688fe5
… for the minimum contribution, a=testonly Automatic update from web-platform-tests [css-grid] Always consider baseline shim for the minimum contribution Before this patch, the shim used for baseline alignment is not taken into consideration when calculating the minimum contribution of a grid item if its preferred size is auto, its minimum size is auto, and the max track sizing function is a fixed small value. In this case, the auto minimum size can produce a smaller track than if it was 0. The specification needs to clarify how baseline shims interact with minimum contributions (w3c/csswg-drafts#3660), but the above doesn't make sense. BUG=934535 TEST=external/wpt/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim.html Change-Id: Iafd194ab7e5656b5018e0e36b915ba183bdedd19 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1481512 Commit-Queue: Oriol Brufau <obrufauigalia.com> Reviewed-by: Manuel Rego <regoigalia.com> Reviewed-by: Javier Fernandez <jfernandezigalia.com> Cr-Commit-Position: refs/heads/master{#637299} -- wpt-commits: c00bf09575cac952e206c2a7025ee7c84971180f wpt-pr: 15511 UltraBlame original commit: 78f7e0538669df28260b7c0a21a1db61e2688fe5
From https://drafts.csswg.org/css-grid/#algo-baseline-shims
The "intrinsic size contribution" term is not linked but I guess it refers exclusively to https://drafts.csswg.org/css-sizing-3/#contributions, i.e. the min-content contribution and the max-content contribution.
However, tracks with an
auto
minimum are sized using the minimum contribution, which may not be an intrinsic size contribution:If the preferred size behaves as auto, does the hypothetical outer size include the shim?
For example, https://jsfiddle.net/wkv4trq2/
If I understand correctly, if the outer size doesn't include the shim, then it will be 100px for both items, so the base size of the row will be 100px. The available grid space is also 100px, so the free space is 0, and the row shouldn't grow beyond this.
However, the row is 200px tall in all Chromium, Firefox and Edge (as you can see with the cyan abspos). So I guess the outer size should include the shim. This is not clear from the spec.
The text was updated successfully, but these errors were encountered: