Appearance
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?
optionalcolor?:string|null
CSS color value, e.g. "#ff0000" or "rgb(255,0,0)".
font-family?
optionalfont-family?:string|null
CSS font-family value, e.g. "Arial, sans-serif".
font-size?
optionalfont-size?:string|null
CSS font-size value, e.g. "14px".
font-style?
optionalfont-style?:"normal"|"italic"|null
CSS font-style. Only "normal" and "italic" are supported.
font-weight?
optionalfont-weight?:string|null
CSS font-weight value, e.g. "bold" or "700".
letter-spacing?
optionalletter-spacing?:string|null
CSS letter-spacing value, e.g. "0.05em".
line-height?
optionalline-height?:string|null
CSS line-height value, e.g. "1.5".
text-decoration?
optionaltext-decoration?:"none"|"underline"|"line-through"|null
CSS text-decoration shorthand.
type
type:
"font"
Defined in: rcml/src/email/content/json-validator/types.ts:12