Unitless number
A unitless number is a CSS numeric value written without a measurement unit and interpreted according to the receiving property.
CSS in Depth, Second Edition
A unitless number is a CSS numeric value written without a unit and interpreted according to the property that receives it.
- How it is used
- Uses unitless numbers for property-specific values and adaptable line-height, especially in inherited typography.
- How deep it goes
- Explains inheritance, local line-height calculation, zero-value limits, and a points-to-pixels conversion, stopping short of broader numeric CSS syntax.
- Examples
- Demonstrates body line-height, an enlarged paragraph, overlapping unit-based text, and conversion of 18pt leading to 1.5.
- What you can do after
- Apply unitless line-height and distinguish safe zero values from unsupported angular and time-based uses.
Read how CSS in Depth, Second Edition explains unitless number →
Math for Web Design
A unitless value is a CSS numeric value without a length or other measurement unit whose interpretation depends on the property.
- How it is used
- Preserves proportional line-height through inheritance and supplies unitless angle inputs to JavaScript trigonometric functions.
- How deep it goes
- Explains inheritance calculations, responsive formulas, and degree-radian conversion, stopping short of broader CSS numeric-value rules.
- Examples
- Uses inherited line-height examples, CSS typography calculations, a scaling results table, and JavaScript degree-radian formulas.
- What you can do after
- Apply unitless line-height for proportional inheritance and convert degree values to JavaScript-compatible radians.
Also covered in
Related concepts
- line heightuses · Line height is the vertical space allocated to a line of text, including the space between successive lines.
Questions about unitless number
What is unitless number?
A unitless number is a CSS numeric value written without a measurement unit and interpreted according to the receiving property.
Which Manning books explain unitless number?
CSS in Depth, Second Edition and Math for Web Design.
What kinds of unitless number are there?
Kinds of unitless number include unitless line height.
What is unitless number a kind of?
Unitless number is a kind of number. A number is a mathematical value representing quantity or position in a numerical system.
What is unitless number also called?
Unitless number is also called unitless value.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

