- From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
- Date: Mon, 23 Dec 2024 02:11:34 +0000
- To: public-css-archive@w3.org
What Gecko does is: it shrinks the table grid box, but not the table wrapper box. That's why margins are unaffected, or here the table doesn't fit next to the float:
```html
<!DOCTYPE html>
<div style="border: solid; width: 150px">
<div style="float: left; width: 75px; height: 50px; background: magenta"></div>
<table style="width: 100px; height: 50px; border-spacing: 0; background: cyan">
<col style="visibility: collapse"></col>
<td></td>
<td></td>
</table>
</div>
```
| Gecko | Blink |
| - | - |
|  |  |
That the table wrapper doesn't shrink can be observed with outline. And it's possible to align the table grid box to the right of the table wrapper box with `direction: rtl`:
```html
<!DOCTYPE html>
<div style="border: 6px solid; width: 150px">
<table style="width: 100px; height: 50px; border-spacing: 0; background: cyan; outline: solid magenta; direction: ltr;">
<col style="visibility: collapse"></col>
<td></td><td></td>
</table>
<table style="width: 100px; height: 50px; border-spacing: 0; background: cyan; outline: solid magenta; direction: rtl;">
<col style="visibility: collapse"></col>
<td></td><td></td>
</table>
</div>
```
| Gecko | Blink |
| - | - |
|  |  |
I think both can be reasonable, but since Gecko allows the wrapper to be bigger than the grid (it can also happen with a caption, but Blink & WebKit never allow it), it should be possible to customize the alignment with `justify-items` (it would apply to the table wrapper, and affect the table grid that would get the initial `justify-self: auto`
--
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11408#issuecomment-2558765641 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 23 December 2024 02:11:34 UTC