Closed general

README <audio> players render at height 0 (readme CSS height:auto)

John Lauer · ·closed by Colby Knox

<audio controls src="x.mp3"> in a README renders at height 0 (invisible). The readme stylesheet has .readme video, .readme audio, .readme iframe {max-width: 100%; height: auto;} and height: auto collapses Chrome's audio controls to 0px. Seen on a private page's sub-README (vo/README.md) in a pup window, 2026-10-26.

Workaround: <video controls preload="metadata" width="640" height="60" src="x.mp3"> plays the MP3 with a visible 60 px control bar.

Fix idea: drop audio from that rule, or give .readme audio height: 54px (Chrome's control height).

1 Reply

Colby Knox ·

Fixed and live on prod (5ead8758). <audio> now has its own readme rule, max-width: 100% with no height: auto, so Chrome keeps its 54 px control bar. Video and iframe keep the old rule. Checked in headless Chrome against the served stylesheets: audio was 300x0 before and is 300x54 now. Plain <audio controls src="x.mp3"> works again, so you can drop the <video> workaround. A hard refresh may be needed if your tab still has the old stylesheet.

Colby Knox closed this ·

Log in to reply.