CSS line-clamp Property Reference

The CSS line-clamp property is a standard property in CSS Overflow. Review its formal syntax, computed behavior, and practical declarations.

CSS line-clamp Property Reference

The CSS line-clamp property is a standard property in CSS Overflow. Review its formal syntax, computed behavior, and practical declarations.

Updated 2026-08-12

line-clamp overview

The CSS line-clamp property is a standard property in CSS Overflow. Review its formal syntax, computed behavior, and practical declarations.

The property is not inherited by default. Use an explicit global keyword when inheritance is intended.

Syntax and formal definition

line-clamp formal syntax
FieldValue
Formal syntaxnone | <integer>
Initial valuenone
Applies toblockContainersExceptMultiColumnContainers
InheritedNo
Percentagesno
Computed valueasSpecified
Animation typeinteger
Mediavisual
Specification groupCSS Overflow
StatusStandard

Practical examples

These declarations demonstrate valid ways to set line-clamp. The initial and inherit global keywords remain available even when a property-specific value is preferable.

line-clamp live example
CSS .reset-example { line-clamp: initial; } .inherit-example { line-clamp: inherit; } @supports (line-clamp: initial) { .supported { line-clamp: initial; } }

Description

The CSS line-clamp property is a standard property in CSS Overflow. Review its formal syntax, computed behavior, and practical declarations.

References

  1. MDN: line-clamp
  2. MDN: CSS Properties Reference

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies