Skip to content

height presentational attribute is not mapped on tr/td/th #507

Description

@KaiserKarel

Summary

blitz-dom's presentational-hint mapping (packages/blitz-dom/src/stylo.rs) maps the width attribute for table | col | tr | td | th | hr, but the height attribute only for table | thead | tbody | tfoot. Per the WHATWG rendering spec, the height attribute also maps to the height property on tr, td, and th.

Real-world impact

HTML-email "bar charts" (e.g. Sentry's weekly report) are built from height="N" table cells whose only content is a font-size:0   — the bar's entire size comes from the height attribute. Without the mapping every bar collapses to zero height and the chart disappears.

Minimal repro

<table style="width:100px;border-collapse:collapse">
  <tr><td height="55" style="background-color:#7553FF;font-size:0;line-height:0">&#160;</td></tr>
</table>

Expected (browsers): a 100×55 purple block. Actual: nothing (zero-height cell).

Fix

One-line-ish: extend the height branch to include tr/td/th, same parse_size_attr handling as the existing table branch. We've applied exactly that in our fork — fifteenlabs/blitz@1bda461 — happy to open a PR if useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions