Open bfgeek opened 2 years ago
(note importantly this definition does/will ignore captions at the top/bottom of the table).
This should use the same logic as we decide in #7641, wrt using cells with last-baseline alignment, and maybe falling back to first-baseline (if we decide to do that for flexbox) before falling back to a synthesized baseline.
Also it should be checking for align-content: last baseline
, not vertical-align: baseline
; see https://www.w3.org/TR/css-align-3/#distribution-block which defines that align-content: normal
defers to vertical-align
but other values override that behavior.
testcase showing lowest content edge baseline: https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=10716
The CSS Working Group just discussed last baseline of tables
, and agreed to the following:
RESOLVED: Table baselines match grid, per details above.
RESOLVED: Rowspanning cells particpate only in first baseline alignment of their first row, and last baseline alignment in the last row
@tabatkins and I have drawn up a PR for this at https://github.com/w3c/csswg-drafts/pull/8341
"The maximum distance between the top of the cell box and the baseline over all cells that have 'vertical-align: baseline' is used to set the baseline of the row. If a row doesn’t have any cell that has 'vertical-align: baseline', the baseline of that row is the bottom content edge of the lowest cell in the row.
The baseline of a table-root is the baseline of its first row, if any. Otherwise, it is the bottom content edge of the table-root."
This definition for first baseline is good! - We also need to define the last baseline behaviour.
Something like: "The last baseline is defined as:
The last baseline of a table-root is the baseline of its last row, if any."
Ian