You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
line-height on an inline element does not change the height of its line #548
In CSS, each inline box takes its height from its own line-height, and the line box grows to hold the tallest. mPDF ignores line-height on an inline element: the line grows for a larger font-size on the span, but not for its line-height.
Measured on gravitypdf at d660a410, PHP 8.5.4. <p>aa <span>qq</span> bb</p><p>zz</p>, with the y of the next paragraph's text:
Rule
zz at
Browser
none
25.5 mm
the same
span{line-height:30mm}
25.5 mm
about 25 mm lower: the first line is about 30 mm high
setCSS() reads LINE-HEIGHT only in its branch for blocks, so an inline element never records it.
Fix. Record line-height on inline elements (inherited into their content as usual), and include each inline box's line-height when the line box is sized, as line-stacking-strategy: inline-line-height describes.
Tests. The rows above, a nested inline element, a number against a length, and an inline element in a table cell.
Activity
jakejackson1 commentedon Sep 30, 2026
Fixed by #646.