[csswg-drafts] [css-align] Baseline of row with no cells (#10137)

Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-align] Baseline of row with no cells ==
https://drafts.csswg.org/css-align/#baseline-export

> If any cells in the row participate in [first baseline](https://drafts.csswg.org/css-align/#valdef-justify-self-first-baseline)/[last baseline](https://drafts.csswg.org/css-align/#valdef-justify-self-last-baseline) alignment along the [inline axis](https://drafts.csswg.org/css-writing-modes-4/#inline-axis) [...]

If there are no cells, the condition is false, so...

>  Otherwise, the first/last baseline set of the row is [synthesized](https://drafts.csswg.org/css-align/#synthesize-baseline) from the lowest and highest content edges of the cells in the row.

What if there are no cells?

```html
<!DOCTYPE html>
a
<table style="display: inline-table; border: 10px solid; margin: 10px; baseline-source: first; width: 60px">
  <tr style="height: 20px; outline: solid cyan"></tr>
  <tr style="height: 20px; outline: solid orange"><td>b</td></tr>
  <tr style="height: 20px; outline: solid magenta"><td></td></tr>
</table>
<table style="display: inline-table; border: 10px solid; margin: 10px; baseline-source: last; width: 60px">
  <tr style="height: 20px; outline: solid cyan"></tr>
  <tr style="height: 20px; outline: solid orange"><td>c</td></tr>
  <tr style="height: 20px; outline: solid magenta"></tr>
</table>
```

| Gecko | Blink | WebKit |
| - | - | - |
| ![](https://github.com/w3c/csswg-drafts/assets/7477678/7b53ab88-97a6-4f4e-a8d1-8d1bb5659aef) | ![](https://github.com/w3c/csswg-drafts/assets/7477678/bf58a5cb-a62b-4db4-9895-cc73fa40fd9f) | ![](https://github.com/w3c/csswg-drafts/assets/7477678/ef974e7d-0d8a-443c-b70c-e4dadc5eb5e3) |

- Gecko seems to ignore `baseline-source` on tables. The 1st baseline is placed at the top of the content area of the 1st row.
- Blink places the 1st baseline at the top of the content area of the 1st row, and the last baseline at the top of the content area of the last row.
- WebKit doesn't set a baseline, so it's synthesized from the bottom of the margin box (as per https://drafts.csswg.org/css-inline-3/#baseline-tables).

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10137 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 25 March 2024 21:32:09 UTC