Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
[css-align] Baseline of a multi-col box? #1572
Comments
tabatkins
added
the
css-align-3
label
Jul 12, 2017
|
Further research using tables shows that:
So we have rough interop on multicol not having a native baseline, which isn't particularly useful behavior. In particular, with Grid Layout, this'll become more of a concern; the current behavior (only really visible with inline-block and tables) is probably not hit very often by authors (and for tables, it's just straight up bad behavior). Blink's behavior for first baseline is reasonable, but its behavior for last-baseline is the worst. So I think we have two choices:
|
tabatkins
added
Agenda+ F2F
Needs Feedback/Review
labels
Jul 18, 2017
|
Option 2 looks a bit more useful, but I am not convinced it is worth the effort fixing our code. I'd slightly lean towards Option 1. Maybe use cases showing how this behavior does not play well with non-bfc-pearcing line rythms would convince me. |
astearns
removed
the
Agenda+ F2F
label
Aug 1, 2017
css-meeting-bot
commented
Aug 2, 2017
|
The CSS Working Group just discussed
The full IRC log of that discussion<dbaron> Topic: baseline of a multicol box<dbaron> github: https://github.com/w3c/csswg-drafts/issues/1572 <fremy> TabAtkins: browsers disagree on what the baselines should be <fremy> TabAtkins: which is not very visible except in tables for instance <fremy> TabAtkins: firefox/edge/webkit consider the multicol has no bottom basline, synthetize one <fremy> TabAtkins: chrome does use the first basline <fremy> TabAtkins: but our last baseline is the last line of the last column which is weird <fremy> TabAtkins: the fixed Chrome behavior could be useful <fremy> TabAtkins: Edge+Firefox could never be useful <fantasai> testcase: http://output.jsbin.com/cenefep <fremy> TabAtkins: (the last basline of Chrome is wrong though) <fremy> TabAtkins: our proposal is to have the spec match Chrome for first baseline <fremy> TabAtkins: for last baseline, we are ok with synthesizing at the bottom <fremy> TabAtkins: we could try to find the bottomest baseline of all columns but that is complex and probably not very useful anyway <fremy> Rossen: why is that useful <fremy> TabAtkins: see linked test case, it really looks bad <dbaron> q+ <fremy> fantasai: drawing an example of when this is useful <Rossen> q? <fremy> <td>TITLE</td><td>[ multi col ] <Rossen> ack dbaron <fantasai> fantasai draws a picture where the title is in the left margin of the page, and is baseline-aligned to the first line of its content, which is a multicol element just to the right of it <astearns> I agree with the first baseline idea, but I don't like the idea of using something that isn't a baseline for last baseline <astearns> I'd rather take the baseline of the last line in the first column <fremy> dbaron: i would be very nervous about anything that tries to use highest thing or lowest thing in columns because baselines could affect size which could affect distribution of the columns <fremy> TabAtkins: first baseline of the first column then <dbaron> s/distribution/distribution of lines/ <dauwhe> q+ <fremy> Florian: if it's hard and useful, we should still try to do it <fremy> TabAtkins: i don;t think it usually very useful <fremy> TabAtkins: and synthetising is close enough <fremy> fantasai: that is not accurate though <fremy> TabAtkins: very rarely needed <Rossen> q? <fremy> dauwhe: baseline alignment between columns is useful though <fremy> TabAtkins: this is something completely different <fremy> TabAtkins: still useful but very different <dauwhe> ack dauwhe <Rossen> ack dauwhe <fantasai> dauwhe gives example of footnotes in last column, last line of footnotes is baseline-aligned to last line of previous column <TabAtkins> s/first baseline of the first column then/that rules out using last baseline of the first column then/ <fremy> Myles_: line-grid usecase, basically <fremy> Rossen: proposed resolution: first baseline = first line of first column; for last baseline, synthetize based on bottom margin edge <fremy> Rossen: we think it is easy to implement <fremy> Rossen: for last baseline it looks mostly ok to me <fantasai> I think we need s/margin/box/ <fremy> Rossen: I have seen zero bug about this <fantasai> because margin vs border varies atm <fantasai> depending on context <fremy> alanstearn: they have not even had a chance to try <fremy> Rossen: we have had multicol + grid for 5+ years <fremy> Rossen: nobody every asked me this anyway <fremy> Florian: I might have wanted this but I can leave without <fremy> Rossen: so, can resolve on proposal? <Florian> s/leave/live/ <fremy> Rossen: any objection? <fremy> RESOLVED: first baseline of multicol is first baseline of first col, last baseline synthetized as described above |
kojiishi commentedJun 29, 2017
8.1. Determining the Baselines of a Box specifies baselines for several layout models.
Is multi-col part of "block containers", or is it not listed and that should be synthesized?
A simple test indicates that: