0

line-height property is defined by the spec in the following way:

On a block container element whose content is composed of inline-level elements, line-height specifies the minimal height of line boxes within the element. The minimum height consists of a minimum height above the baseline and a minimum depth below it ...

So there is a base font size of text, which amounts to 1em, a vertical space between the ascent and descent lines, and the line-height is designed to extend this space.

Are there any rules that calculate what a specific place at the extended line box the text, limited by the 1em space, must take? I mean this possible distinction:

enter image description here

(all the free space is just put below the text)

enter image description here

(the free space is allocated proportionally)

It seems that the second option is in use (jsfiddle) but I want to find out the specific rules of space allocation, or they are unspecified exactly?

Ilya Loskutov
  • 1,717
  • 2
  • 14
  • 31

0 Answers0