mirror of
https://github.com/hanzoai/ui.git
synced 2026-11-21 00:18:41 +00:00
The site drew its fences, example sources and module types through @hanzogui/code-to-html (refractor) and coloured the tokens from its own stylesheet. code.ts now highlights them at build with shiki in codeTheme from @hanzo/ui/core, Dracula on dark and GitHub Light on light, the same theme docs.hanzo.ai, hanzo.ai and platform draw. Tokens and the block's ground are written as light-dark(), so the scheme on <html> picks the palette; the .code token rules and code-to-html are gone, and nothing highlights in the browser. The CodeBlock example names codeTheme.dark rather than github-dark. The navigation menu example stops importing navigationMenuTriggerStyle, which 8.27.45 removed and which failed the site build.
97 lines
1.8 KiB
CSS
97 lines
1.8 KiB
CSS
html,
|
|
body {
|
|
margin: 0;
|
|
background: var(--background);
|
|
color: var(--color);
|
|
}
|
|
|
|
a {
|
|
color: inherit;
|
|
}
|
|
|
|
/* The sidebar scrolls on its own, under the header, at the page's height. */
|
|
.rail {
|
|
overflow-y: auto;
|
|
scrollbar-width: thin;
|
|
}
|
|
|
|
.code {
|
|
/* The highlighter (code.ts) paints the ground and every token with
|
|
light-dark(), so the colours here are the theme's and this rule is layout. */
|
|
margin: 0;
|
|
padding: 16px 18px;
|
|
overflow-x: auto;
|
|
border-radius: 8px;
|
|
border: 1px solid var(--borderColor);
|
|
font-family: var(--f-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
|
|
font-size: 13px;
|
|
line-height: 1.6;
|
|
white-space: pre;
|
|
tab-size: 2;
|
|
}
|
|
|
|
/* A docs page's running text: what Markdown emits that no primitive draws. */
|
|
.doc {
|
|
font-size: var(--text-base, 14px);
|
|
line-height: 20px;
|
|
}
|
|
|
|
.doc a {
|
|
color: var(--color12);
|
|
text-decoration: underline;
|
|
text-decoration-color: var(--color8);
|
|
text-underline-offset: 3px;
|
|
}
|
|
|
|
.doc a:hover {
|
|
text-decoration-color: var(--color12);
|
|
}
|
|
|
|
.doc ul,
|
|
.doc ol {
|
|
margin: 0;
|
|
padding-inline-start: 1.5em;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
}
|
|
|
|
.doc li::marker {
|
|
color: var(--color10);
|
|
}
|
|
|
|
.doc :not(pre) > code {
|
|
font-family: var(--f-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
|
|
font-size: 0.92em;
|
|
padding: 1px 5px;
|
|
border-radius: 4px;
|
|
background: var(--color3);
|
|
}
|
|
|
|
.doc table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 13px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.doc th,
|
|
.doc td {
|
|
text-align: left;
|
|
vertical-align: top;
|
|
padding: 8px 12px;
|
|
border-bottom: 1px solid var(--borderColor);
|
|
}
|
|
|
|
.doc th {
|
|
color: var(--color11);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.doc blockquote {
|
|
margin: 0;
|
|
padding-left: 16px;
|
|
border-left: 2px solid var(--borderColor);
|
|
color: var(--color11);
|
|
}
|