web-platform-tests / interop

web-platform-tests Interop project
https://wpt.fyi/interop
318 stars 27 forks source link

Unprefixed `line-clamp` #725

Open BenjaminAster opened 1 month ago

BenjaminAster commented 1 month ago

Description

The line-clamp CSS property still needs a -webkit- prefix and some additional non-standard properties (display: -webkit-box and -webkit-box-orient: vertical) to be set in Chromium, WebKit and Firefox. Chromium is currently working on implementing the unprefixed property. Implementing this new standardized property, which differs significantly from the old non-standard -webkit-line-clamp property, likely needs a lot of work from an implementation standpoint.


This issue is one of seven issues regarding unprefixing CSS properties/values, originally all in #702 (as per https://github.com/web-platform-tests/interop/issues/702#issuecomment-2358173009). The aim is to group the properties together into multiple (but not seven) focus areas.

Specification

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

Additional Signals

These are mostly copy-pasted from @ccpandhare's comment. Thank you Chinmay!

1) What interop tests if any this affects:

gsnedders commented 1 month ago

See also #16 and discussion there from prior years.

bfgeek commented 1 month ago

Note the new collapse variant specification is here: https://github.com/w3c/csswg-drafts/pull/10816

bfgeek commented 1 month ago

If this goes through it should only be for line-clamp and not the individual sub-properties yet (max-lines, continue, etc).

jabcreations commented 1 month ago

It's called Blink, not Chromium; Chromium is a browser, not a rendering engine.

775

The line-clamp property (sans prefixes) should not be supported unless anything it relies on also is cleaned up and does not require prefixes. Anyone using CSS.supports() would end up getting confused. I clarified the details when I posted my thread.

ccpandhare commented 1 month ago

We (@rich-hansen, @ccpandhare) were planning to submit this exact proposal but found yours. Adding our "Additional Signals" section below:

1) What interop tests if any this affects:

BenjaminAster commented 1 month ago

@jabcreations

It's called Blink, not Chromium; Chromium is a browser, not a rendering engine.

I am very well aware of the difference between Chromium and Blink. Blink is a part of the Chromium project and inseparably tied to it. If you want to look at Blink's source code, you'll land in the Chromium repository. When creating Interop issues, it is important that people who are not deeply familiar with Chromium's internal structure also understand what I'm talking about. Chromium is the de facto umbrella term that also includes Blink and that—contrary to "Blink"—is very well known.

The line-clamp property (sans prefixes) should not be supported unless anything it relies on also is cleaned up and does not require prefixes.

Yes, this is what this issue is about. "Unprefixing line-clamp" refers to much more than just to change the property name in Blink's source code from -webkit-line-clamp to line-clamp. It means to implement an entirely new thing that doesn't depend on any other -webkit- stuff (see the linked specification).


@ccpandhare Thank you! I added these to the original comment.

andreubotella commented 1 month ago
  1. What interop tests if any this affects:

There are some additional tests for the parsing of line-clamp-related properties in https://github.com/web-platform-tests/wpt/tree/ec979384f0340b8d18c3512f02f42b65bd5f456c/css/css-overflow/parsing.

There are also some tests in other parts of css/ that test the interaction of (-webkit-)line-clamp with other properties. We don't need to include all of them, but I list them here for completeness: