HtmlForgeX

API Reference

Class

EmailCssConstants

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email
Modifiers static

Constants for common CSS values used throughout the HtmlForgeX.Email library. Centralizes hardcoded strings to improve maintainability and consistency.

Inheritance

  • Object
  • EmailCssConstants

Fields

public const String PrimaryFontFamily #

Primary font family stack for email content. Optimized for cross-platform and cross-client compatibility.

Value: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif
public const String FallbackFontFamily #

Fallback font family for MSO/Outlook clients.

Value: Arial, Helvetica, sans-serif
public const String MonospaceFontFamily #

Monospace font family for code and technical content.

Value: 'Courier New', Courier, monospace
public const String DefaultBackgroundColor #

Default background color for email body (light gray).

Value: #f3f6fb
public const String DefaultTextColor #

Default text color (dark gray).

Value: #334155
public const String MutedTextColor #

Muted text color used for secondary labels.

Value: #64748b
public const String DarkBackgroundColor #

Default dark background color for dark mode.

Value: #0b1220
public const String WhiteBackgroundColor #

Default white background for content boxes.

Value: #ffffff
public const String LightGrayColor #

Light gray color for subtle backgrounds and stripes.

Value: #f1f5f9
public const String MediumGrayColor #

Medium gray color for borders and subtle elements.

Value: #e2e8f0
public const String DarkColor #

Dark color for headings and emphasis.

Value: #0b1220
public const String SecondaryLightColor #

Secondary light background color.

Value: #f1f5f9
public const String SecondaryBorderColor #

Secondary border color.

Value: #e2e8f0
public const String FontFamilyStyle #

Common CSS style for font-family property.

Value: font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif
public const String BorderCollapseStyle #

Common border-collapse style for tables.

Value: border-collapse: collapse
public const String FullWidthStyle #

Common width 100% style.

Value: width: 100%
public const String WebkitTextSizeAdjustStyle #

Common webkit text size adjust style.

Value: -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%
public const String VerticalAlignTopStyle #

Common vertical align top style.

Value: vertical-align: top
public const String BreakWordWrapStyle #

Common wrapping style that prevents long strings (hostnames, IDs, errors) from overflowing in Outlook clients.

Value: word-wrap: break-word; overflow-wrap: break-word; word-break: normal; white-space: normal;
public const String PreventTableSeamsStyle #

Prevents tiny seams/gaps between stacked tables in some clients (notably iOS Outlook / WebKit-based clients).

Value: font-size: 0; line-height: 0;
public const String BaseTableStyle #

Common table base style combining font-family, border-collapse, and width.

Value: font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; border-collapse: collapse; width: 100%
public const String BaseCellStyle #

Common cell base style with font-family.

Value: font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif
public const String EnhancedTableStyle #

Enhanced table style with all common properties.

Value: font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; border-collapse: collapse; width: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%
public const String DefaultElementMargin #

Default element bottom margin (12px). Standardized margin for consistent spacing between elements.

Value: 0 0 12px 0