w3c / w3c/csswg-drafts

[css-overflow-4] Syntax to opt into clamping at the earlier of a size and a number of line

Open
#13,670 19 comments 0 reactions 1 assignee View on GitHub

@frivoal is already working on this.

Since Apr 2, 2026.

Closed Accepted by CSSWG Resolution css-overflow-4 Needs Edits Needs Testcase (WPT) topic: line-clamp
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

In https://github.com/w3c/csswg-drafts/issues/12041, we decided that if you set both a max-line and n height or a max-height, only the number of lines affects clamping. ((max-)height affects the height, normally, but without changing what content gets clamped).

This was primarily driven by compat needs. We also said it'd be good to have an opt-in to clamp to the earlier of the (max-)height and the specified number of lines, we just need to find syntax for it. This issue is for discussing that.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.