Skip to content

[css-align] baseline content-alignment shouldn't be able to change intrinsic sizes #1409

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

Open
dbaron opened this issue May 20, 2017 · 8 comments

Comments

@dbaron
Copy link
Member

dbaron commented May 20, 2017

The section on baseline content alignment ends with the sentence:

This can increase the intrinsic size of the box.

It's not clear how this is supposed to work, for two reasons:

  • intrinsic sizes are a function of the content and styles of a box and its descendants, whereas the amount of size change needed for baseline alignment depends on other elements in the baseline-sharing group
  • it seems like there's a potential for loops here, although I haven't thought this through
@dbaron dbaron added the css-align-3 Current Work label May 20, 2017
@javifernandez
Copy link
Contributor

I think the issue #1039 I filed some time ago is quite related to this one. I'm still fighting against this concept in the implementation for Blink and WebKit and I still have many doubts.

@frivoal
Copy link
Collaborator

frivoal commented May 21, 2017

This seems to be a similar problem to the one faced by the line-grid in #880.

@fantasai
Copy link
Collaborator

fantasai commented Jun 27, 2017

Another related issue: #1365

@tabatkins
Copy link
Member

Tables adjust the size of their cells when things are baseline-aligned. Grid and Flexbox need to do so too; otherwise, you'd get results like Status of the grid when we apply baseline alignment, where anything that had to move down to align is likely to overflow. This would make baseline alignment entirely unusable within auto-height containers.

Currently, the spec attempts to address this by including these adjustments in the intrinsic sizes of the aligned items. Are you suggesting there is some other way to get this behavior? If so, how? :)

@javifernandez
Copy link
Contributor

I understand why we need to let grid/flex items to adjust their sizes when they are baseline-aligned. My doubts came from the following facts that we have to integrate with this behavior:

  • item's container intrinsic size must be determined without needing to laid out the items.
  • once items are baseline-aligned during layout, what should we do with containers with intrinsic size dimensions ? eg, fit-content, min-content, ...

@dbaron
Copy link
Member Author

dbaron commented Jul 18, 2017

(I'll assume horizontal writing modes here so I can write "height" and "width".)

The heights of table cells are not determined from intrinsic sizes. They're a result of layout. Intrinsic sizes only exist as widths; there's no such thing as an intrinsic height in table layout (and I've objected to the addition of such a concept in sizing, since I don't think it makes sense).

Though I'm not entirely sure what your image is an image of...

@javifernandez
Copy link
Contributor

Though I'm not entirely sure what your image is an image of...
The image is a grid layout, with an orthogonal element in the second column using ahem font.

I agree with your statement about height being the result of a layout, so it's not an intrinsic size. However, the issue this image is trying to illustrate (see issue #1365) could lead to inline-axis overflow,
since grid layout allows baseline alignment along the row-axis. Are you suggesting that we should only avoid changes in the intrinsic width ?

I understand Tab comment on the need of adjusting the container's size after applying baseline alignment, however, issue#1365 have several points that makes such behavior difficult to implement inside the grid tracks sizing algorithm, specially regarding the following condition:

Then, if the min-content contribution of any grid items have changed based on the row sizes calculated in step 2, steps 1 and 2 are repeated with the new min-content contribution and max-content contribution (once only).

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 16, 2018
We have identified several cases where the Baseline Alignment accounts
for the grid's intrinsic size. Since we depend on the track sizing
algorithm to compute the grid's intrinsic size, the only way to handle
all these cases is to integrate the baseline alignment logic in the
algorithm.

Additionally, the CSSWG has identified several cases that can't be
solved properly; such cases have in common that they imply cyclic
dependencies between the item's and grid area's size. The CSSWG has
resolved that these items don't participate in baseline alignment:

w3c/csswg-drafts#1365

There are also other related issues with some examples and relevant
discussions about this topic:

w3c/csswg-drafts#1039
w3c/csswg-drafts#1409

Bug: 704713
Change-Id: I817b16eb43aa76f4827deb8f1f20efb7fde3dc22
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Mar 7, 2018
We have identified several cases where the Baseline Alignment accounts
for the grid's intrinsic size. Since we depend on the track sizing
algorithm to compute the grid's intrinsic size, the only way to handle
all these cases is to integrate the baseline alignment logic in the
algorithm.

Additionally, the CSSWG has identified several cases that can't be
solved properly; such cases have in common that they imply cyclic
dependencies between the item's and grid area's size. The CSSWG has
resolved that these items don't participate in baseline alignment:

w3c/csswg-drafts#1365

There are also other related issues with some examples and relevant
discussions about this topic:

w3c/csswg-drafts#1039
w3c/csswg-drafts#1409

Bug: 704713
Change-Id: I817b16eb43aa76f4827deb8f1f20efb7fde3dc22
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Mar 19, 2018
We have identified several cases where the Baseline Alignment accounts
for the grid's intrinsic size. Since we depend on the track sizing
algorithm to compute the grid's intrinsic size, the only way to handle
all these cases is to integrate the baseline alignment logic in the
algorithm.

Additionally, the CSSWG has identified several cases that can't be
solved properly; such cases have in common that they imply cyclic
dependencies between the item's and grid area's size. The CSSWG has
resolved that these items don't participate in baseline alignment:

w3c/csswg-drafts#1365

There are also other related issues with some examples and relevant
discussions about this topic:

w3c/csswg-drafts#1039
w3c/csswg-drafts#1409

Bug: 704713
Change-Id: I817b16eb43aa76f4827deb8f1f20efb7fde3dc22
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue May 21, 2018
We have identified several cases where the Baseline Alignment accounts
for the grid's intrinsic size. Since we depend on the track sizing
algorithm to compute the grid's intrinsic size, the only way to handle
all these cases is to integrate the baseline alignment logic in the
algorithm.

Additionally, the CSSWG has identified several cases that can't be
solved properly; such cases have in common that they imply cyclic
dependencies between the item's and grid area's size. The CSSWG has
resolved that these items don't participate in baseline alignment:

w3c/csswg-drafts#1365

There are also other related issues with some examples and relevant
discussions about this topic:

w3c/csswg-drafts#1039
w3c/csswg-drafts#1409

Bug: 704713
Change-Id: I817b16eb43aa76f4827deb8f1f20efb7fde3dc22
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue May 22, 2018
We have identified several cases where the Baseline Alignment accounts
for the grid's intrinsic size. Since we depend on the track sizing
algorithm to compute the grid's intrinsic size, the only way to handle
all these cases is to integrate the baseline alignment logic in the
algorithm.

Additionally, the CSSWG has identified several cases that can't be
solved properly; such cases have in common that they imply cyclic
dependencies between the item's and grid area's size. The CSSWG has
resolved that these items don't participate in baseline alignment:

w3c/csswg-drafts#1365

There are also other related issues with some examples and relevant
discussions about this topic:

w3c/csswg-drafts#1039
w3c/csswg-drafts#1409

Bug: 704713
Change-Id: I817b16eb43aa76f4827deb8f1f20efb7fde3dc22
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue May 28, 2018
We have identified several cases where the Baseline Alignment accounts
for the grid's intrinsic size. Since we depend on the track sizing
algorithm to compute the grid's intrinsic size, the only way to handle
all these cases is to integrate the baseline alignment logic in the
algorithm.

Additionally, the CSSWG has identified several cases that can't be
solved properly; such cases have in common that they imply cyclic
dependencies between the item's and grid area's size. The CSSWG has
resolved that these items don't participate in baseline alignment:

w3c/csswg-drafts#1365

There are also other related issues with some examples and relevant
discussions about this topic:

w3c/csswg-drafts#1039
w3c/csswg-drafts#1409

Bug: 704713
Change-Id: I817b16eb43aa76f4827deb8f1f20efb7fde3dc22
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue May 29, 2018
We have identified several cases where the Baseline Alignment accounts
for the grid's intrinsic size. Since we depend on the track sizing
algorithm to compute the grid's intrinsic size, the only way to handle
all these cases is to integrate the baseline alignment logic in the
algorithm.

Additionally, the CSSWG has identified several cases that can't be
solved properly; such cases have in common that they imply cyclic
dependencies between the item's and grid area's size. The CSSWG has
resolved that these items don't participate in baseline alignment:

w3c/csswg-drafts#1365

There are also other related issues with some examples and relevant
discussions about this topic:

w3c/csswg-drafts#1039
w3c/csswg-drafts#1409

Bug: 704713
Change-Id: I817b16eb43aa76f4827deb8f1f20efb7fde3dc22
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue May 29, 2018
We have identified several cases where the Baseline Alignment accounts
for the grid's intrinsic size. Since we depend on the track sizing
algorithm to compute the grid's intrinsic size, the only way to handle
all these cases is to integrate the baseline alignment logic in the
algorithm.

Additionally, the CSSWG has identified several cases that can't be
solved properly; such cases have in common that they imply cyclic
dependencies between the item's and grid area's size. The CSSWG has
resolved that these items don't participate in baseline alignment:

w3c/csswg-drafts#1365

There are also other related issues with some examples and relevant
discussions about this topic:

w3c/csswg-drafts#1039
w3c/csswg-drafts#1409

Bug: 704713
Change-Id: I817b16eb43aa76f4827deb8f1f20efb7fde3dc22
aarongable pushed a commit to chromium/chromium that referenced this issue May 29, 2018
We have identified several cases where the Baseline Alignment accounts
for the grid's intrinsic size. Since we depend on the track sizing
algorithm to compute the grid's intrinsic size, the only way to handle
all these cases is to integrate the baseline alignment logic in the
algorithm.

Additionally, the CSSWG has identified several cases that can't be
solved properly; such cases have in common that they imply cyclic
dependencies between the item's and grid area's size. The CSSWG has
resolved that these items don't participate in baseline alignment:

w3c/csswg-drafts#1365

There are also other related issues with some examples and relevant
discussions about this topic:

w3c/csswg-drafts#1039
w3c/csswg-drafts#1409

Bug: 704713
Change-Id: I817b16eb43aa76f4827deb8f1f20efb7fde3dc22
Reviewed-on: https://chromium-review.googlesource.com/923261
Commit-Queue: Javier Fernandez <[email protected]>
Reviewed-by: Sergio Villar <[email protected]>
Cr-Commit-Position: refs/heads/master@{#562406}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue May 29, 2018
We have identified several cases where the Baseline Alignment accounts
for the grid's intrinsic size. Since we depend on the track sizing
algorithm to compute the grid's intrinsic size, the only way to handle
all these cases is to integrate the baseline alignment logic in the
algorithm.

Additionally, the CSSWG has identified several cases that can't be
solved properly; such cases have in common that they imply cyclic
dependencies between the item's and grid area's size. The CSSWG has
resolved that these items don't participate in baseline alignment:

w3c/csswg-drafts#1365

There are also other related issues with some examples and relevant
discussions about this topic:

w3c/csswg-drafts#1039
w3c/csswg-drafts#1409

Bug: 704713
Change-Id: I817b16eb43aa76f4827deb8f1f20efb7fde3dc22
Reviewed-on: https://chromium-review.googlesource.com/923261
Commit-Queue: Javier Fernandez <[email protected]>
Reviewed-by: Sergio Villar <[email protected]>
Cr-Commit-Position: refs/heads/master@{#562406}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue May 31, 2018
We have identified several cases where the Baseline Alignment accounts
for the grid's intrinsic size. Since we depend on the track sizing
algorithm to compute the grid's intrinsic size, the only way to handle
all these cases is to integrate the baseline alignment logic in the
algorithm.

Additionally, the CSSWG has identified several cases that can't be
solved properly; such cases have in common that they imply cyclic
dependencies between the item's and grid area's size. The CSSWG has
resolved that these items don't participate in baseline alignment:

w3c/csswg-drafts#1365

There are also other related issues with some examples and relevant
discussions about this topic:

w3c/csswg-drafts#1039
w3c/csswg-drafts#1409

Bug: 704713
Change-Id: I817b16eb43aa76f4827deb8f1f20efb7fde3dc22
Reviewed-on: https://chromium-review.googlesource.com/923261
Commit-Queue: Javier Fernandez <[email protected]>
Reviewed-by: Sergio Villar <[email protected]>
Cr-Commit-Position: refs/heads/master@{#562406}
Hexcles pushed a commit to web-platform-tests/wpt that referenced this issue May 31, 2018
We have identified several cases where the Baseline Alignment accounts
for the grid's intrinsic size. Since we depend on the track sizing
algorithm to compute the grid's intrinsic size, the only way to handle
all these cases is to integrate the baseline alignment logic in the
algorithm.

Additionally, the CSSWG has identified several cases that can't be
solved properly; such cases have in common that they imply cyclic
dependencies between the item's and grid area's size. The CSSWG has
resolved that these items don't participate in baseline alignment:

w3c/csswg-drafts#1365

There are also other related issues with some examples and relevant
discussions about this topic:

w3c/csswg-drafts#1039
w3c/csswg-drafts#1409

Bug: 704713
Change-Id: I817b16eb43aa76f4827deb8f1f20efb7fde3dc22
Reviewed-on: https://chromium-review.googlesource.com/923261
Commit-Queue: Javier Fernandez <[email protected]>
Reviewed-by: Sergio Villar <[email protected]>
Cr-Commit-Position: refs/heads/master@{#562406}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Jun 10, 2018
…tracks sizing algorithm, a=testonly

Automatic update from web-platform-tests[css-grid] Baseline alignment inside the tracks sizing algorithm

We have identified several cases where the Baseline Alignment accounts
for the grid's intrinsic size. Since we depend on the track sizing
algorithm to compute the grid's intrinsic size, the only way to handle
all these cases is to integrate the baseline alignment logic in the
algorithm.

Additionally, the CSSWG has identified several cases that can't be
solved properly; such cases have in common that they imply cyclic
dependencies between the item's and grid area's size. The CSSWG has
resolved that these items don't participate in baseline alignment:

w3c/csswg-drafts#1365

There are also other related issues with some examples and relevant
discussions about this topic:

w3c/csswg-drafts#1039
w3c/csswg-drafts#1409

Bug: 704713
Change-Id: I817b16eb43aa76f4827deb8f1f20efb7fde3dc22
Reviewed-on: https://chromium-review.googlesource.com/923261
Commit-Queue: Javier Fernandez <[email protected]>
Reviewed-by: Sergio Villar <[email protected]>
Cr-Commit-Position: refs/heads/master@{#562406}

--

wpt-commits: 82b278966038f26cb83ceeb67404b0ce7e13a74c
wpt-pr: 9553
xeonchen pushed a commit to xeonchen/gecko-cinnabar that referenced this issue Jun 12, 2018
…tracks sizing algorithm, a=testonly

Automatic update from web-platform-tests[css-grid] Baseline alignment inside the tracks sizing algorithm

We have identified several cases where the Baseline Alignment accounts
for the grid's intrinsic size. Since we depend on the track sizing
algorithm to compute the grid's intrinsic size, the only way to handle
all these cases is to integrate the baseline alignment logic in the
algorithm.

Additionally, the CSSWG has identified several cases that can't be
solved properly; such cases have in common that they imply cyclic
dependencies between the item's and grid area's size. The CSSWG has
resolved that these items don't participate in baseline alignment:

w3c/csswg-drafts#1365

There are also other related issues with some examples and relevant
discussions about this topic:

w3c/csswg-drafts#1039
w3c/csswg-drafts#1409

Bug: 704713
Change-Id: I817b16eb43aa76f4827deb8f1f20efb7fde3dc22
Reviewed-on: https://chromium-review.googlesource.com/923261
Commit-Queue: Javier Fernandez <[email protected]>
Reviewed-by: Sergio Villar <[email protected]>
Cr-Commit-Position: refs/heads/master@{#562406}

--

wpt-commits: 82b278966038f26cb83ceeb67404b0ce7e13a74c
wpt-pr: 9553
@dbaron
Copy link
Member Author

dbaron commented Jul 18, 2018

Exactly how problematic this is may also be clearer after the issues in the final paragraph of #2890 (comment) are resolved.

gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 3, 2019
…tracks sizing algorithm, a=testonly

Automatic update from web-platform-tests[css-grid] Baseline alignment inside the tracks sizing algorithm

We have identified several cases where the Baseline Alignment accounts
for the grid's intrinsic size. Since we depend on the track sizing
algorithm to compute the grid's intrinsic size, the only way to handle
all these cases is to integrate the baseline alignment logic in the
algorithm.

Additionally, the CSSWG has identified several cases that can't be
solved properly; such cases have in common that they imply cyclic
dependencies between the item's and grid area's size. The CSSWG has
resolved that these items don't participate in baseline alignment:

w3c/csswg-drafts#1365

There are also other related issues with some examples and relevant
discussions about this topic:

w3c/csswg-drafts#1039
w3c/csswg-drafts#1409

Bug: 704713
Change-Id: I817b16eb43aa76f4827deb8f1f20efb7fde3dc22
Reviewed-on: https://chromium-review.googlesource.com/923261
Commit-Queue: Javier Fernandez <jfernandezigalia.com>
Reviewed-by: Sergio Villar <svillarigalia.com>
Cr-Commit-Position: refs/heads/master{#562406}

--

wpt-commits: 82b278966038f26cb83ceeb67404b0ce7e13a74c
wpt-pr: 9553

UltraBlame original commit: 00d30e4a61583727bb9cde10fb27957b2e9731f9
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 3, 2019
…tracks sizing algorithm, a=testonly

Automatic update from web-platform-tests[css-grid] Baseline alignment inside the tracks sizing algorithm

We have identified several cases where the Baseline Alignment accounts
for the grid's intrinsic size. Since we depend on the track sizing
algorithm to compute the grid's intrinsic size, the only way to handle
all these cases is to integrate the baseline alignment logic in the
algorithm.

Additionally, the CSSWG has identified several cases that can't be
solved properly; such cases have in common that they imply cyclic
dependencies between the item's and grid area's size. The CSSWG has
resolved that these items don't participate in baseline alignment:

w3c/csswg-drafts#1365

There are also other related issues with some examples and relevant
discussions about this topic:

w3c/csswg-drafts#1039
w3c/csswg-drafts#1409

Bug: 704713
Change-Id: I817b16eb43aa76f4827deb8f1f20efb7fde3dc22
Reviewed-on: https://chromium-review.googlesource.com/923261
Commit-Queue: Javier Fernandez <jfernandezigalia.com>
Reviewed-by: Sergio Villar <svillarigalia.com>
Cr-Commit-Position: refs/heads/master{#562406}

--

wpt-commits: 82b278966038f26cb83ceeb67404b0ce7e13a74c
wpt-pr: 9553

UltraBlame original commit: 00d30e4a61583727bb9cde10fb27957b2e9731f9
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 3, 2019
…tracks sizing algorithm, a=testonly

Automatic update from web-platform-tests[css-grid] Baseline alignment inside the tracks sizing algorithm

We have identified several cases where the Baseline Alignment accounts
for the grid's intrinsic size. Since we depend on the track sizing
algorithm to compute the grid's intrinsic size, the only way to handle
all these cases is to integrate the baseline alignment logic in the
algorithm.

Additionally, the CSSWG has identified several cases that can't be
solved properly; such cases have in common that they imply cyclic
dependencies between the item's and grid area's size. The CSSWG has
resolved that these items don't participate in baseline alignment:

w3c/csswg-drafts#1365

There are also other related issues with some examples and relevant
discussions about this topic:

w3c/csswg-drafts#1039
w3c/csswg-drafts#1409

Bug: 704713
Change-Id: I817b16eb43aa76f4827deb8f1f20efb7fde3dc22
Reviewed-on: https://chromium-review.googlesource.com/923261
Commit-Queue: Javier Fernandez <jfernandezigalia.com>
Reviewed-by: Sergio Villar <svillarigalia.com>
Cr-Commit-Position: refs/heads/master{#562406}

--

wpt-commits: 82b278966038f26cb83ceeb67404b0ce7e13a74c
wpt-pr: 9553

UltraBlame original commit: 00d30e4a61583727bb9cde10fb27957b2e9731f9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants