blitz-dom: non-table-internal children of a table are dropped instead of wrapped in anonymous boxes
Generated from repros/blitz-dom-table-anonymous-boxes/README.md when the site was built at 7aa23e2.
What niso does
Section titled “What niso does”No workaround in niso. Found by Acid2 (the ul on line 14 of the test). niso’s Element.getBoundingClientRect() is blitz’s
get_client_bounding_rect (crates/niso-core/src/api.rs:241), and the render stream places native views at
blitz’s layout boxes (crates/niso-core/src/render.rs), so both are off by the same amount.
Where the bug is
Section titled “Where the bug is”blitz-dom layout/table.rs. Blitz lays a table out as a CSS grid of its cells (build_table_context,
table.rs:203-235) and collect_table_cells (table.rs:515) ignores every child that is not a row group, row or
cell: DisplayInside::Flow | FlowRoot | Flex | Grid | GridLanes (table.rs:739-750, “Probably a table caption:
ignore”) and a nested DisplayInside::Table (table.rs:751-754). Those boxes get no layout at all. CSS 2.1 §17.2.1 /
CSS Tables 3 §3.3 wrap them in an anonymous cell (and the cells in an anonymous row).
Expected vs actual
Section titled “Expected vs actual”<ul style="display:table"> with four <li>: table-cell, table (nested), table-cell, block; all 10px wide:
ul width: expected 40, actual 20li0: expected x=0 width=10, actual x=0 width=10li1: expected x=10 width=10, actual x=0 width=0li2: expected x=20 width=10, actual x=10 width=10li3: expected x=30 width=10, actual x=0 width=0Chrome 156: ul width 40, every li 10x12 at x = 0, 10, 20, 30. (li2’s height, 6 instead of 12, is the separate
cell-stretch bug in blitz-dom-table-cell-row-height.)
CARGO_TARGET_DIR=~/.capy/work/repro-target cargo runExit status 1 while the bug reproduces, 0 once fixed. Needs libfontconfig-dev pkg-config on Ubuntu. Built with
blitz-dom features system-fonts, accessibility, floats (as niso), viewport 800x600 at scale 1.
Upstream main
Section titled “Upstream main”Reproduces. Blitz main was still at be60597f67b3cece0456d26e8d7ff5a88600bbc5 (niso’s pin) when tested on 2026-11-08, so the pinned result is the main result.
Tested against open PR https://github.com/DioxusLabs/blitz/pull/1370 (“Use Taffy table layout for CSS
tables”, head 0c20c4e7ffadf356bd4ae04bd90e3cf3342da8b2, pins Taffy b2bd579 from DioxusLabs/taffy#1380) with
path dependencies on a local checkout: fixed there (exit 0).
Existing issue or PR
Section titled “Existing issue or PR”- https://github.com/DioxusLabs/blitz/issues/1430 (open, 2026-11-05): “Anonymous table boxes aren’t generated:
non-cell children of a table are dropped” — the same bug (block child of
display:table,td{display:block}). - https://github.com/DioxusLabs/blitz/pull/1370 (open): fixes it (verified above).
- https://github.com/DioxusLabs/blitz/pull/783, #781, #786 (open, older): anonymous table box fixups.
Issue text
Section titled “Issue text”Already filed as #1430; if anything, a comment there:
Another case, from Acid2: a nested
display: tablechild of a table is dropped too, not only blocks.<ul style="display:table;margin:0;padding:0"><li style="display:table-cell;width:10px;height:12px"></li><li style="display:table;width:10px;height:12px"></li><li style="display:table-cell;height:6px;width:10px"></li><li style="list-style:none;width:10px;height:12px"></li></ul>gives ul width 20 with li 2 and 4 at 0×0 (Chrome: 40, four 10×12 boxes at x = 0/10/20/30). Tested at be60597; #1370 (0c20c4e) fixes it.