DioxusLabs / DioxusLabs/blitz

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

Open Beginner friendly
#507 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.1k
Forks
203
Avg merge
8h 58m
Merged PRs (30d)
112

Description

## 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](https://html.spec.whatwg.org/multipage/rendering.html#tables-2), 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

```html

 

```

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@1bda461a6156c658b0a61227f90f74f838f8f3c4 — happy to open a PR if useful.

Contributor guide

Open the contributing guide

Research direction

Start in packages/blitz-dom/src/stylo.rs and inspect the existing presentational-hint mapping for width and height, including parse_size_attr handling. Confirm the height mapping covers tr, td, and th, then verify the minimal table-cell reproduction produces the expected nonzero height.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
frontend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.