File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -417,6 +417,14 @@ TCSS = record
417
417
// / <returns>string. Required CSS property.</returns>
418
418
class function OverflowProp (const Value : TCSSOverflowValue;
419
419
const Direction: TCSSOverflowDirection = codBoth): string; static;
420
+
421
+ // / <summary>Creates a CSS "line-height" property.</summary>
422
+ // / <param name="Percentage">UInt16 [in] Line height as a percentage of
423
+ // / font size.</param>
424
+ // / <returns>string. Required CSS property.</returns>
425
+ // / <remarks>Only the percentage version of line height is supported.
426
+ // / </remarks>
427
+ class function LineHeightProp (const Percentage: UInt16): string; static;
420
428
end ;
421
429
422
430
@@ -615,6 +623,11 @@ class function TCSS.LengthUnit(const LU: TCSSLengthUnit): string;
615
623
Result := Units[LU];
616
624
end ;
617
625
626
+ class function TCSS.LineHeightProp (const Percentage: UInt16): string;
627
+ begin
628
+ Result := ' line-height: ' + IntToStr(Percentage) + ' %' ;
629
+ end ;
630
+
618
631
class function TCSS.MarginProp (const Margin: array of Integer): string;
619
632
begin
620
633
Assert(Length(Margin) in [1 ,2 ,4 ],
You can’t perform that action at this time.
0 commit comments