Usage
<hr>
--thematic-break-spacing-topand --thematic-break-spacing-bottomto align breaks with the document rhythm --thematic-break-border-width, --thematic-break-border-color, and --thematic-break-border-stylefor line weight and character --thematic-break-widthplus --thematic-break-margin-left/ --thematic-break-margin-rightto control alignment and centered rules --thematic-break-border-width-printfor thinner rules in print output
--content-spacing
Tokens
<hr>
--thematic-break-spacing-top | var(--content-spacing) | |
--thematic-break-spacing-bottom | var(--content-spacing) | |
--thematic-break-border-width | var(--border-width-default) | |
--thematic-break-border-width-print | var(--border-width-default) | |
--thematic-break-border-color | var(--border-color-default) | |
--thematic-break-border-style | solid | |
--thematic-break-width | 100% | |
--thematic-break-margin-left | 0 | |
--thematic-break-margin-right | 0 |
Examples
Default Thematic Breaks
:root {
/* No design token overrides */
}Decorative Breaks
:root {
--thematic-break-border-width: 2px;
--thematic-break-border-style: double;
--thematic-break-border-color: var(--color-accent);
--thematic-break-width: 50%;
--thematic-break-margin-left: auto;
--thematic-break-margin-right: auto;
}Dashed Breaks
:root {
--thematic-break-border-style: dashed;
--thematic-break-border-color: var(--color-gray-400);
}Compact Breaks
:root {
--thematic-break-spacing-top: calc(var(--content-spacing) * 0.5);
--thematic-break-spacing-bottom: calc(var(--content-spacing) * 0.5);
--thematic-break-border-width: 1px;
--thematic-break-border-color: var(--color-gray-500);
}Short Centered Breaks
:root {
--thematic-break-width: 30%;
--thematic-break-margin-left: auto;
--thematic-break-margin-right: auto;
--thematic-break-border-width: 1px;
}Tips
--content-spacing--thematic-break-spacing-top/bottom
--thematic-break-width
--thematic-break-border-width-print