-
Notifications
You must be signed in to change notification settings - Fork 681
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
[css-align-3][css-multicol] How is the last-baseline of a multi-col determined? #7639
Comments
Four options that seem to maybe make sense here are:
Note: A regular block box (that contains text) uses its last baseline. (Defined in 2.1 for inline blocks, at least, which was the only context the question made sense back then.) We suspect (3) will give the best behavior; in simple cases it and (2) will be more or less identical, but (3) works better in more cases. /cc @MurakamiShinyu for opinions |
The CSS Working Group just discussed
The full IRC log of that discussion<Rossen_> Topic: How is the last-baseline of a multi-col determined?<fremy> RESOLVED: (and vice-versa for the last baseline) <Rossen_> github: https://github.com//issues/7639 <fremy> iank_: for multicolumns elements, we currently take the baseline of the first column <fremy> iank_: and implementations don't look for a last baseline <fremy> iank_: maybe we should? <fremy> iank_: but it's still an option not to, like we do today <TabAtkins> q+ <fremy> iank_: we can take the last baseline of the first column <fremy> iank_: or of the last column <fremy> iank_: or the lowest of all the columns <fremy> dbaron: exporting the baseline of a multicolumn sounds scary <fremy> dbaron: especially if you have balancing going on <dbaron> s/the baseline/the last baseline/ <fremy> iank_: if you use the last column and you balance, it will often work <fremy> iank_: but without balancing, you can end up somewhere random in the height <Rossen_> q? <fremy> fantasai: that seems the worst indeed <fremy> fantasai: I think the best would be the max <fremy> TabAtkins: fantasai just said what I was about to say <fantasai> s/the max/the max, and second best would be the last line of the first column/ <fremy> iank_: the only caveat is that we probably don't want to include spanned items <fremy> fantasai: why not? <fremy> fantasai: if sounds like an rare case, but why not? <fremy> iank_: (nodding) <fremy> fantasai: I think checking all columns is better <rachelandrew> +1 to checking all columns <fremy> fantasai: in case you have a large image that doesn't fit at the bottom of the first column <fremy> iank_: I'm fine with that <fremy> iank_: we have some compat constraints for inline-block <fremy> iank_: but here it's ok <fremy> fantasai: proposed resolution is to use the lowest last baseline of all columns <fremy> Rossen_: any objection? <fremy> RESOLVED: for multicolumns, use the lowest last baseline of all columns as its last baseline <TabAtkins> ScribeNick: <TabAtkins> ScribeNick: TabAtkins |
Sorry for not giving my opinion. I had no idea of inline multi-column use cases, but I agree that the worst is "Last baseline of the last column", and the best is "Lowest of the last baselines of all the columns". So I am content with the resolution. |
See: w3c/csswg-drafts#7639 Effectively we need to propagate the last baseline from the lowest of all fragments. This does change the baseline of a multi-col within a inline-block context. Bug: 885175 Change-Id: I8385f89cbe0bb3cc89fc972546f56ddd9ae391bd
Would this be a good opportunity to also fix first-baseline, so that we're consistent about this? I agree with the resolution, so that last-baseline becomes the lowest last baseline of all columns. But it's quite different from what we do for first-baseline. Why not also make the first-baseline of a multicol container the same as the highest first-baseline of all columns? Granted, it's very likely that the first column has a good first-baseline, much more so than expecting the last column to have a good last-baseline (the last column may only be partially filled, for instance), but it's not guaranteed. Also, consistency. |
@mstensho Split off into new issue. |
See: w3c/csswg-drafts#7639 Effectively we need to propagate the last baseline from the lowest of all fragments. This does change the baseline of a multi-col within a inline-block context. Bug: 885175 Change-Id: I8385f89cbe0bb3cc89fc972546f56ddd9ae391bd
See: w3c/csswg-drafts#7639 Effectively we need to propagate the last baseline from the lowest of all fragments. This does change the baseline of a multi-col within a inline-block context. Bug: 885175 Change-Id: I8385f89cbe0bb3cc89fc972546f56ddd9ae391bd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3931189 Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/main@{#1056833}
See: w3c/csswg-drafts#7639 Effectively we need to propagate the last baseline from the lowest of all fragments. This does change the baseline of a multi-col within a inline-block context. Bug: 885175 Change-Id: I8385f89cbe0bb3cc89fc972546f56ddd9ae391bd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3931189 Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/main@{#1056833}
See: w3c/csswg-drafts#7639 Effectively we need to propagate the last baseline from the lowest of all fragments. This does change the baseline of a multi-col within a inline-block context. Bug: 885175 Change-Id: I8385f89cbe0bb3cc89fc972546f56ddd9ae391bd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3931189 Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/main@{#1056833}
See: w3c/csswg-drafts#7639 Effectively we need to propagate the last baseline from the lowest of all fragments. This does change the baseline of a multi-col within a inline-block context. Bug: 885175 Change-Id: I8385f89cbe0bb3cc89fc972546f56ddd9ae391bd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3931189 Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/main@{#1056833} NOKEYCHECK=True GitOrigin-RevId: bc669f613244300d069571e47dc3e89b16871937
…ne to lowest of all fragments, a=testonly Automatic update from web-platform-tests [last-baseline] Set multicol last-baseline to lowest of all fragments See: w3c/csswg-drafts#7639 Effectively we need to propagate the last baseline from the lowest of all fragments. This does change the baseline of a multi-col within a inline-block context. Bug: 885175 Change-Id: I8385f89cbe0bb3cc89fc972546f56ddd9ae391bd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3931189 Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/main@{#1056833} -- wpt-commits: 5e9bb795bc7c57a07ee258f362e50c4014108530 wpt-pr: 36316
…ne to lowest of all fragments, a=testonly Automatic update from web-platform-tests [last-baseline] Set multicol last-baseline to lowest of all fragments See: w3c/csswg-drafts#7639 Effectively we need to propagate the last baseline from the lowest of all fragments. This does change the baseline of a multi-col within a inline-block context. Bug: 885175 Change-Id: I8385f89cbe0bb3cc89fc972546f56ddd9ae391bd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3931189 Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/main@{#1056833} -- wpt-commits: 5e9bb795bc7c57a07ee258f362e50c4014108530 wpt-pr: 36316
This is edited in, and the latest text should soon be appearing here: https://drafts.csswg.org/css-align-3/#baseline-export |
Is it the last-baseline of the first fragmentainer or the last?
Today in an inline-context the baseline is always synthesized from the block-end border-box edge. (We likely aren't restricted by compat here however).
The text was updated successfully, but these errors were encountered: