Skip to content

Rule.io SDK


Rule.io SDK / rcml/src / FontMark

Type Alias: FontMark

FontMark = object

Defined in: rcml/src/email/content/json-validator/types.ts:11

A font mark that applies typographic styling to a text node. All attributes are optional — only include the attrs you want to set. null is treated identically to omission: the serializer filters it out and the attribute is not emitted. (The RFM-to-JSON converter always emits all eight keys, setting unset ones to null; sparse editor-produced marks simply omit them instead.) At least one attribute must be present (a bare font mark with no attrs has no effect).

Properties

attrs

attrs: object

Defined in: rcml/src/email/content/json-validator/types.ts:13

color?

optional color?: string | null

CSS color value, e.g. "#ff0000" or "rgb(255,0,0)".

font-family?

optional font-family?: string | null

CSS font-family value, e.g. "Arial, sans-serif".

font-size?

optional font-size?: string | null

CSS font-size value, e.g. "14px".

font-style?

optional font-style?: "normal" | "italic" | null

CSS font-style. Only "normal" and "italic" are supported.

font-weight?

optional font-weight?: string | null

CSS font-weight value, e.g. "bold" or "700".

letter-spacing?

optional letter-spacing?: string | null

CSS letter-spacing value, e.g. "0.05em".

line-height?

optional line-height?: string | null

CSS line-height value, e.g. "1.5".

text-decoration?

optional text-decoration?: "none" | "underline" | "line-through" | null

CSS text-decoration shorthand.


type

type: "font"

Defined in: rcml/src/email/content/json-validator/types.ts:12