Skip to content

CSS line-clamp #1379

Description

@kenrick95

Description

This seems like a yearly affair to ask for unprefixed CSS line-clamp. The major use cases are to clamp lines of text in a card UI. So far, web developers need to use a very specific hack to achieve such UI, like the example shown in MDN:

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;

Since the line-clamp draft proposal is specified in CSS Overflow Module 4, it would be best to continue the effort for implementation. From the last year's proposal, it seemed to have gathered quite a number of positive feedback, but alas it was not chosen for Interop 2026. Therefore I'd like to re-raise it again for Interop 2027

Meme of Bernie Sanders with title 'Interop' and subtitle 'I am once asking for CSS line-clamp'

Specification

https://drafts.csswg.org/css-overflow-4/#line-clamp

web-feature

https://web-platform-dx.github.io/web-features-explorer/features/line-clamp/

Test Links

No response

Additional Signals

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

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions