@@ -283,28 +283,32 @@ Baseline Alignment: the ''baseline'' and ''last-baseline'' keywords</h3>
283283 <dt> <dfn>baseline</dfn>
284284 <dd>
285285 Indicates <dfn dfn for export>first-baseline alignment</dfn> :
286- aligns one of baselines in the box's <a>first baseline set</a>
287- in the appropriate axis
286+ If the box has a <a>natural baseline</a> in the appropriate axis,
287+ aligns one of the baselines in the box's <a>first baseline set</a>
288+ in that axis
288289 with the corresponding baseline
289290 in the <a>first baseline sets</a>
290291 of all the boxes in its <a>baseline-sharing group</a> .
291292
292293 If the <a>alignment subject</a> ’s position is not fully determined by <a>baseline alignment</a> ,
293- the content is ''start'' -aligned insofar as possible while preserving the baseline alignment.
294- (Content that has no <a>first baselines</a> is thus start-aligned.)
294+ or the box has no <a>natural baseline</a> in the appropriate axis,
295+ the content is ''start'' -aligned insofar as possible while preserving the <a>baseline alignment</a> .
296+ (<a>Alignment subjects</a> that have no inline-level content are thus ''start'' -aligned.)
295297
296298 <dt> <dfn>last-baseline</dfn>
297299 <dd>
298300 Indicates <dfn dfn for export>last-baseline alignment</dfn> :
299- aligns one of baselines in the box's <a>last baseline set</a>
300- in the appropriate axis
301+ If the box has a <a>natural baseline</a> in the appropriate axis,
302+ aligns one of the baselines in the box's <a>last baseline set</a>
303+ in that axis
301304 with the corresponding baseline
302305 in the <a>last baseline sets</a>
303306 of all the boxes in its <a>baseline-sharing group</a> .
304307
305308 If the <a>alignment subject</a> ’s position is not fully determined by <a>baseline alignment</a> ,
306- the content is ''end'' -aligned insofar as possible while preserving the baseline alignment.
307- (Content that has no <a>last baselines</a> is thus end-aligned.)
309+ or the box has no <a>natural baseline</a> in the appropriate axis,
310+ the content is ''end'' -aligned insofar as possible while preserving the <a>baseline alignment</a> .
311+ (<a>Alignment subjects</a> that have no inline-level content are thus ''end'' -aligned.)
308312
309313 Issue: Should this ''end'' fallback be ''safe'' or ''unsafe'' ?
310314 </dl>
@@ -677,7 +681,7 @@ Baseline Content-Alignment</h3>
677681 <dt> Table Cells:
678682 <dd>
679683 A <a>table cell</a> participates in first (last) <a>baseline content-alignment</a>
680- in either its row or column (whichever matches its <a>inline axis </a> )
684+ in either its row or column (whichever matches the axises of its <a>natural baselines </a> )
681685 if its computed 'align-content' is ''baseline'' (''last-baseline'' ).
682686
683687 <dt> Flex Items:
@@ -695,7 +699,7 @@ Baseline Content-Alignment</h3>
695699 <dt> Grid Items:
696700 <dd>
697701 A <a>grid item</a> participates in first (last) <a>baseline content-alignment</a>
698- in either its row or column (whichever matches its <a>inline axis </a> )
702+ in either its row or column (whichever matches the axises of its <a>natural baselines </a> )
699703 if its computed 'align-content' is ''baseline'' (''last-baseline'' ),
700704 and its computed 'align-self' or 'justify-self' (whichever affects its <a>block axis</a> )
701705 is ''align-self/stretch'' or ''self-start'' (''self-end'' ).
@@ -1148,7 +1152,7 @@ Baseline Self-Alignment</h3>
11481152 <dt> Grid Items:
11491153 <dd>
11501154 A <a>grid item</a> participates in first (last) <a>baseline self-alignment</a>
1151- in either its row or column (whichever matches its <a>inline axis </a> )
1155+ in either its row or column (whichever axises it has a <a>natural baseline </a> in )
11521156 if its 'justify-self' or 'align-self' property (whichever affects its <a>block axis</a> )
11531157 computes to ''baseline'' (''last-baseline'' ).
11541158 </dl>
@@ -1363,6 +1367,14 @@ Determining the Baselines of a Box</h2>
13631367
13641368 Note: The forthcoming Inline Layout Module will define synthesis rules for baselines other than alphabetic and central.
13651369
1370+ A box has a <dfn export>natural baseline</dfn>
1371+ if it derives its <a>baseline set</a> (s) from a font's baseline table
1372+ (whether or not the UA had to <a href="https://drafts.csswg.org/css-inline/#baseline-synthesis-fonts">synthesize that baseline table</a> ,
1373+ e.g. due to it being missing from the font).
1374+ It has a <dfn export>synthesized baseline</dfn>
1375+ if its baselines are <a>synthesized</a> from the geometry of its box,
1376+ as described above.
1377+
13661378 <p class='issue'>
13671379 Maybe these things are wrong?
13681380 CSS 2.1 is really weird about baseline alignment.
@@ -1375,10 +1387,12 @@ Baseline Alignment Terminology</h3>
13751387 This is possible only if they
13761388
13771389 <ul>
1378- <li> share an <a>alignment context</a> whose axis is parallel to their <a>inline axis</a>
1379- <li> either have the same <a>block flow direction</a> and <a>baseline alignment preference</a> ,
1380- or have opposite <a>block flow direction</a> and opposite <a>baseline alignment preference</a>
1381- (in other words, the baselines that want to align are on the same side of the alignment context).
1390+ <li> share an <a>alignment context</a> whose axis is parallel to an axis in which they have a baseline
1391+ <li> the baselines that want to align are on the same “side” of the alignment context,
1392+ e.g. the boxes in a vertical-axis <a>alignment context</a> all want to align their leftmost baseline
1393+ (whether that is the first baseline in a ''vertical-lr'' flow,
1394+ the last baseline in a ''vertical-rl'' flow,
1395+ or the first baseline of a ''vertical-lr'' flow that has been propagated to being the block-axis <a>first baseline</a> of a ''horizontal-tb'' ''ltr'' grid container)
13821396 </ul>
13831397
13841398 Boxes <dfn lt="shared alignment context|alignment context" export>share an alignment context</dfn> along a particular axis when they are:
@@ -1391,6 +1405,9 @@ Baseline Alignment Terminology</h3>
13911405 <li> flex items in the same flex line, along the flex container's main axis
13921406 </ul>
13931407
1408+ Note: The inline-level boxes on a line box also share an alignment context and participate in a baseline-sharing group;
1409+ however this is detailed in the CSS Inline Layout module, not here.
1410+
13941411 Boxes in a <a>baseline-sharing group</a> are aligned to each other
13951412 using their <dfn export>alignment baseline</dfn> .
13961413 This is the dominant baseline associated with
@@ -1400,6 +1417,9 @@ Baseline Alignment Terminology</h3>
14001417 specifying ''align-content: baseline'' on table cells in the same row
14011418 will align the alphabetic baselines of their <a>first formatted lines</a> .
14021419
1420+ Note: The 'alignment-baseline' property introduced in CSS Inline Layout Level 3
1421+ will allow changing which baseline is used for baseline alignment within a <a>baseline-sharing group</a> .
1422+
14031423<h3 id='align-by-baseline'>
14041424Aligning Boxes by Baseline</h3>
14051425
0 commit comments