Skip to content

line-clamp proper association to a MODERN CSS property instead of -webkit-box from 2000s #775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jabcreations opened this issue Oct 2, 2024 · 3 comments
Labels
investigation-effort-proposal Investigation Effort Proposal

Comments

@jabcreations
Copy link

jabcreations commented Oct 2, 2024

Description

The CSS line-clamp property is exceptionally valuable for mobile devices when I need to prevent text from getting out of control. Unfortunately it's an absolute mess. Who still goes out of their way to support -webkit-box for anything? As far as I can determine there are no other display values that line-clamp will work with.

I propose either updating display: flex to support line-clamp or to have a new value. Unfortunately I haven't been able to be involved in any of those decisions though I am predominately using flex, block, inline-block and inline except for tables in the vast majority of cases.

  • I recommend at least two years to still support -webkit-box after a proper permanent solution is found
  • I recommend the permanent solution not require a CSS prefix since this feature seems stable as-is.
  • I recommend updated documentation also addressing the -webkit-box-orient property and what property and values of that property should replace it.

Rationale

  • Ancient -webkit-box from the first out of the now three (?) iterations for flexbox.
  • Messy: requires a CSS prefix for something that has been around for years.
  • Unstable: suggests we'll be stuck with CSS prefixes for eternity.

Investigation Roadmap

The primary issue is the -webkit-box value for the display property and the -webkit-box-orient property being required for line-clamp.

Secondly the feature seems stable and I think a rendering engine update should provide the non-prefixed property explicitly only when it can be used without old/required properties and values with their CSS prefixes. That would ensure that feature detection was not bugged/worthless. It is better to release later and stable than to rush to the market in a mess.

@jabcreations jabcreations added the investigation-effort-proposal Investigation Effort Proposal label Oct 2, 2024
@mrego
Copy link
Member

mrego commented Oct 4, 2024

This is related to #725

BTW, Chromium has an ongoing implementation for line-clamp: https://issues.chromium.org/issues/40336192

@jabcreations
Copy link
Author

Blink, that is the name of that rendering engine. Thank you Mr. Ego the links.

@wpt-interop
Copy link
Collaborator

Thank you for proposing line-clamp proper association to a MODERN CSS property instead of -webkit-box from 2000s for inclusion in Interop 2025.

We wanted to let you know that this proposal was not selected to be part of Interop this year.

On behalf of the entire Interop team, thank you for submitting this proposal for consideration. We got many more proposals than we could include in this year's project, necessitating some difficult choices. Please note this should not be taken as a comment on the technology as a whole, or our willingness to consider it for Interop in the future. We appreciate the work you put into your proposal, and would welcome your participation in future rounds of Interop.

For an overview of our process, see proposal selection. Thank you again for contributing to Interop 2025.

Posted on behalf of the Interop team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigation-effort-proposal Investigation Effort Proposal
Projects
Status: Done
Development

No branches or pull requests

4 participants