Skip to content

Commit d85f27f

Browse files
author
delphidabbler
committed
Add new TCSS.InlineDisplayProp
1 parent 16184f0 commit d85f27f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Src/UCSSUtils.pas

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,13 @@ TCSS = record
403403
/// <returns>string. Required CSS property.</returns>
404404
class function BlockDisplayProp(const Show: Boolean): string; static;
405405

406+
/// <summary>Creates a CSS "display" property that causes its element to be
407+
/// either hidden or displayed as "inline".</summary>
408+
/// <param name="Show">Boolean [in] Flag indicating if block is to be
409+
/// displayed (True) or hidden (False).</param>
410+
/// <returns>string. Required CSS property.</returns>
411+
class function InlineDisplayProp(const Show: Boolean): string; static;
412+
406413
/// <summary>Creates a CSS "overflow", "overflow-x" or overflow-y"
407414
/// property.</summary>
408415
/// <param name="Value">TCSSOverflowValue [in] Required overflow handling.
@@ -586,6 +593,14 @@ class function TCSS.HideBorderProp(const Side: TCSSSide): string;
586593
Result := BorderProp(Side, 0, cbsNone, clNone);
587594
end;
588595

596+
class function TCSS.InlineDisplayProp(const Show: Boolean): string;
597+
const
598+
// Map of flag onto required display style
599+
BlockDisplayStyles: array[Boolean] of TCSSDisplayStyle = (cdsNone, cdsInline);
600+
begin
601+
Result := DisplayProp(BlockDisplayStyles[Show]);
602+
end;
603+
589604
class function TCSS.LengthList(const List: array of Integer;
590605
const LU: TCSSLengthUnit): string;
591606
var

0 commit comments

Comments
 (0)