HtmlForgeX

API Reference

Class

EmailLayout

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email
Modifiers static

Centralized layout configuration for email components. Ensures consistent spacing and alignment across all email elements.

Inheritance

  • Object
  • EmailLayout

Methods

public static String GetColumnGap(Nullable<Int32> screenWidth = null) #
Returns: String

Gets the effective column gap based on the current viewport width.

Parameters

screenWidth System.Nullable{System.Int32} = null optionalposition: 0
Optional width override for calculations.
public static String GetContainerPadding(Nullable<Int32> screenWidth = null) #
Returns: String

Gets the effective container padding based on the current viewport width.

Parameters

screenWidth System.Nullable{System.Int32} = null optionalposition: 0
Optional width override for calculations.
public static String GetContentPadding() #
Returns: String

Gets content padding that aligns with container padding. Used for text and other elements to maintain consistent alignment.

public static String GetTableCellPadding() #
Returns: String

Gets the complete table cell padding string combining vertical and horizontal.

public static Void ResetToDefaults() #
Returns: Void

Resets all configuration to default values.

public static Void SetCompactSpacing() #
Returns: Void

Sets compact spacing (8px) for tighter layouts.

public static Void SetGenerousSpacing() #
Returns: Void

Sets generous spacing (16px) for more spacious layouts.

public static Void SetGlobalPadding(String padding) #
Returns: Void

Sets global padding for all email components. Maintains alignment consistency.

Parameters

padding System.String requiredposition: 0
The padding value (e.g., "8px", "16px", "24px")

Properties

public static String ContainerPadding { get; set; } #

Standard container padding for EmailBox elements. This is the base padding applied to email content containers.

public static String ContainerPaddingMobile { get; set; } #

Container padding applied when the viewport width matches the mobile breakpoint.

public static String ContainerCssClass { get; set; } #

CSS class applied to container tables for responsive styling.

public static Int32 ViewportWidth { get; set; } #

Current viewport width in pixels used for responsive calculations. Defaults to desktop width.

public static String ContentPadding { get; set; } #

Content padding for text and other elements inside containers. Provides inner spacing for readability.

public static String TableCellPaddingVertical { get; set; } #

Table cell padding (vertical) for spacing between rows.

public static String TableCellPaddingHorizontal { get; set; } #

Table cell padding (horizontal) for spacing within cells.

public static String BoxSpacing { get; set; } #

Standard spacing between EmailBox elements.

public static String ChildSpacing { get; set; } #

Standard spacing between child elements within a container.

public static String ColumnGap { get; set; } #

Spacing between columns on desktop layouts.

public static String ColumnGapMobile { get; set; } #

Spacing between columns on mobile layouts.