Mailglass.Components.Layout (Mailglass v1.2.0)

Copy Markdown View Source

Email document layout with MSO head and CSS reset.

Emits the <!DOCTYPE html> + <head> + <body> wrapper once. The head contains the MSO OfficeDocumentSettings XML block (D-12) so classic Outlook Windows renders images at 96 DPI, and light-only color-scheme metas so Outlook.com cannot partial-invert the design (D-13 defers dark mode to v0.5).

Usage

<Mailglass.Components.Layout.email_layout title="Welcome">
  <Mailglass.Components.container>
    ...
  </Mailglass.Components.container>
</Mailglass.Components.Layout.email_layout>

Summary

Functions

Renders a full email HTML document with MSO head and CSS reset.

Functions

email_layout(assigns)

(since 0.1.0)

Renders a full email HTML document with MSO head and CSS reset.

Attributes:

  • :lang — html lang attribute (default "en").
  • :title — optional <title> element contents.

Attributes

  • lang (:string) - Defaults to "en".
  • title (:string) - Defaults to nil.

Slots

  • inner_block (required)