applyStyle
Applies text overflow, wrapping, and line clamping CSS styles.
Note on maxLines vs minLines CSS implementation inconsistency:
maxLinesuses-webkit-line-clampwithdisplay: -webkit-boxand-webkit-box-orient: vertical, which is the only widely-supported CSS mechanism for multi-line text truncation. The standardline-clampproperty (without-webkit-prefix) is not yet widely supported.minLinesusesmin-heightwithlh(line-height) units, as there is no CSS equivalent tomin-line-clamp.
Note on TextOverflow.Visible degradation when maxLines is set: -webkit-line-clamp requires overflow: hidden to function, so TextOverflow.Visible effectively degrades to Clip when maxLines is set on JS DOM. There is no CSS way to both limit visible lines and allow text to overflow beyond its bounds.
Note on softWrap and maxLines interaction: In Compose UI, when softWrap is false, the text is always single-line and maxLines is ignored. On JS DOM, white-space: nowrap achieves the same single-line behavior, so -webkit-line-clamp is only applied when softWrap is true.