Skip to content

[Bug] Invalid line-height CSS property for StyledTable #5362

Description

@Eta0

Invalid StyledTableline-height

The default line-height CSS property defined for a StyledTable uses an invalid calc expression, causing it to be ignored in most browsers.

line-height: calc(20 / var(--table-font-size));

(Nearby, --table-font-size is defined as 0.75rem, so this ends up as calc(20 / 0.75rem)).

Due to a bug in Chromium (seemingly fixed in commit chromium/chromium@9928efc), for some newer Chromium builds, this was briefly not ignored, and resulted in illegibly short lines. This property should be removed or changed to a more correct default like line-height: 1.5.

Interestingly, this exact calculation was added as a test case as an example of an invalid calc expression in the Chromium source tree (calc(20 / 0.75rem)), possibly motivated by this CSS snippet, so that should serve as quick proof that this line is currently not correct:

assert_invalid_value("margin-left","calc(20 / 0.75rem)",// invalid calc expression"division by non-number");

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions