Overview
MarkdownTheme is the primary struct for configuring the visual appearance of rendered markdown content. It contains nested types for fonts, colors, spacing, and other visual properties.
Declaration
Properties
Font configurations for different text elements in the markdown view.
See MarkdownTheme.Fonts for details.
Color configurations for text, highlights, code blocks, and backgrounds.
See MarkdownTheme.Colors for details.
Spacing configurations for layout and padding.
See MarkdownTheme.Spacings for details.
Size configurations for visual elements like bullets.
See MarkdownTheme.Sizes for details.
Table-specific styling configurations.
See MarkdownTheme.Table for details.
Image-specific styling configurations.
See MarkdownTheme.Image for details.
Static Properties
The default theme instance with system default values.
The scale factor applied to code font sizes relative to body text.
Methods
scaleFont(by:)
Scales all fonts in the theme by a predefined scale factor.The font scale to apply. Options:
.tiny, .small, .middle, .large, .hugealign(to:)
Aligns all fonts to a specific point size.The base point size to align fonts to.
codeScale (0.85).
Nested Types
FontScale
An enumeration defining predefined font scaling options.Applies -4 point offset to default fonts.
Applies -2 point offset to default fonts.
Applies 0 point offset (default size).
Applies +2 point offset to default fonts.
Applies +4 point offset to default fonts.