[css-overflow-4] Syntax to opt into clamping at the earlier of a size and a number of line
Open
@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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.