CSS max-lines Property Reference

The CSS max-lines property is a experimental property in CSS Overflow. Review its formal syntax, computed behavior, and practical declarations.

CSS max-lines Property Reference

The CSS max-lines property is a experimental property in CSS Overflow. Review its formal syntax, computed behavior, and practical declarations.

Updated 2026-08-12

max-lines overview

The CSS max-lines property is a experimental 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

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

Practical examples

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

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

Description

The CSS max-lines property is a experimental property in CSS Overflow. Review its formal syntax, computed behavior, and practical declarations.

References

  1. MDN: max-lines
  2. MDN: CSS Properties Reference

Similar or alternative tools

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