RESOLVED FIXED298000
Should percentage values for -webkit-line-clamp be removed?
https://bugs.webkit.org/show_bug.cgi?id=298000
Summary Should percentage values for -webkit-line-clamp be removed?
Karl Dubost
Reported 2025-08-27 18:22:33 PDT
See the discussion on https://mastodon.andreubotella.com/@andreu/115101230698019883 Safari supports percentage values for -webkit-line-clamp The implementation is not what web developers are expecting. And it's implemented only in WebKit. Blink removed it on March 2018 https://groups.google.com/a/chromium.org/g/blink-dev/c/-e92az54B4I/m/SZdhGR19DgAJ https://issues.chromium.org/issues/40565689 > We added a UseCounter for %-values for -webkit-line-clamp and it has effectively no usage. > https://www.chromestatus.com/metrics/feature/timeline/popularity/2139 https://searchfox.org/wubkat/rev/a722bd4d57831d96ac4ce77b1c203734445b77f1/Source/WebCore/style/StyleBuilderConverter.h#1748-1749 ```cpp if (primitiveValue->primitiveType() == CSSUnitType::CSS_PERCENTAGE) return LineClampValue(std::max(primitiveValue->resolveAsPercentage<int>(builderState.cssToLengthConversionData()), 0), LineClamp::Percentage); ``` https://searchfox.org/wubkat/search?q=symbol:E_%3CT_WebCore%3A%3ALineClamp%3E_Percentage&redirect=false
Attachments
Radar WebKit Bug Importer
Comment 1 2025-09-03 18:23:13 PDT
Ahmad Saleem
Comment 2 2025-09-20 06:04:49 PDT
EWS
Comment 3 2026-08-09 05:34:09 PDT
Committed 318858@main (8cbbfc9b154d): <https://commits.webkit.org/318858@main> Reviewed commits have been landed. Closing PR #51064 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.