Skip to content

WebKit: Table cells containing vertical or sideways writing-mode child ignores line height, renders at incorrect width #95

Description

@querkmachine

Upstream bug: https://bugs.webkit.org/show_bug.cgi?id=313826
Date: 2026-05-01
Reported by: @querkmachine
Related to: N/A


Overview

When a table cell contains a child element that has a writing-mode of either vertical-* or sideways-*, the line height (and/or block-axis dimension) of that element's content is ignored when computing the width of the table cell. This results in the content being visually rendered outside of the table cell.

This does not occur if the writing-mode is set on the table cell itself, only for child elements. It also does not occur if the value of writing-mode is one of the horizontal-* values. Margins, padding and borders all contribute to the width calculation as expected, with only the content height being disregarded.

Reproduction: https://codepen.io/querkmachine/pen/ByQyYrW

Expected result

As rendered in Chrome 147 and Firefox 150.

Image

Actual result

As rendered in Safari 26.4.

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions