Files
heroui-vue/apps/docs/.vitepress/theme/style.css
T

407 lines
8.6 KiB
CSS

@font-face {
font-family: Inter;
src: url("/fonts/Inter-Regular.ttf") format("truetype");
font-weight: 400;
font-display: swap;
}
@font-face {
font-family: Inter;
src: url("/fonts/Inter-Medium.ttf") format("truetype");
font-weight: 500 600;
font-display: swap;
}
@font-face {
font-family: Inter;
src: url("/fonts/Inter-Bold.ttf") format("truetype");
font-weight: 700 900;
font-display: swap;
}
:root {
font-family: Inter, ui-sans-serif, system-ui, "PingFang SC", sans-serif;
font-synthesis: none;
--docs-border: oklch(0 0 0 / 10%);
font-size: 16px;
}
.dark {
--docs-border: oklch(1 0 0 / 10%);
}
* {
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
scroll-padding-top: 88px;
}
body {
margin: 0;
background: var(--background);
color: var(--foreground);
-webkit-font-smoothing: antialiased;
}
@layer base {
a {
color: inherit;
text-decoration: none;
}
}
/* Documentation prose is isolated from every live component example. */
.docs-content {
font-size: 16px;
line-height: 1.75;
}
.docs-content :is(h2, h3, h4):not(:where(.not-prose, .not-prose *)) {
font-weight: 600;
line-height: 1.4;
scroll-margin-top: 154px;
}
.docs-content h2:not(:where(.not-prose, .not-prose *)) {
font-size: 24px;
line-height: 1.333333;
letter-spacing: -0.5px;
margin: 48px 0 24px;
}
.docs-content > h2:first-child,
.docs-content > div > h2:first-child {
margin-top: 0;
}
.docs-content h3:not(:where(.not-prose, .not-prose *)) {
font-size: 20px;
margin: 32px 0 16px;
}
.docs-content h4:not(:where(.not-prose, .not-prose *)) {
font-size: 15px;
margin: 24px 0 12px;
}
.docs-content p:not(:where(.not-prose, .not-prose *)) {
margin: 16px 0;
}
.docs-content :is(ul, ol):not(:where(.not-prose, .not-prose *)) {
padding-left: 22px;
}
.docs-content ul:not(:where(.not-prose, .not-prose *)) {
list-style: disc;
}
.docs-content ol:not(:where(.not-prose, .not-prose *)) {
list-style: decimal;
}
.docs-content li:not(:where(.not-prose, .not-prose *)) {
margin: 6px 0;
}
.docs-content a:not(.header-anchor):not(:where(.not-prose, .not-prose *)) {
text-decoration: underline;
text-underline-offset: 4px;
}
.header-anchor {
float: left;
margin-left: -20px;
opacity: 0;
font-size: 16px;
}
.docs-content :is(h2, h3, h4):hover .header-anchor,
.header-anchor:focus-visible {
opacity: 1;
}
.docs-content :not(pre) > code:not(:where(.not-prose, .not-prose *)) {
background: var(--default);
border-radius: 5px;
padding: 2px 5px;
font-size: 12px;
}
.docs-content div[class*="language-"] {
position: relative;
border: 0;
border-radius: 12px;
background: var(--default);
margin: 16px 0;
}
.docs-content div[class*="language-"] > .lang {
position: absolute;
right: 48px;
top: 9px;
font-size: 11px;
color: var(--muted);
}
.docs-content pre {
overflow: auto;
padding: 22px;
margin: 0;
font-family: ui-monospace, SFMono-Regular, monospace;
font-size: 13px;
line-height: 1.7;
tab-size: 2;
scrollbar-width: thin;
}
.docs-content pre code {
white-space: pre;
}
.shiki,
.shiki span {
color: var(--shiki-light);
}
.dark .shiki,
.dark .shiki span {
color: var(--shiki-dark) !important;
background-color: transparent !important;
}
/* Keep both long API tables and short state tables full width; never horizontal scroll. */
.docs-content table:not(:where(.not-prose, .not-prose *)) {
display: table;
table-layout: fixed;
width: 100%;
border-collapse: collapse;
font-size: 12px;
margin: 18px 0 30px;
}
.docs-content :is(th, td):not(:where(.not-prose, .not-prose *)) {
padding: 13px 12px;
border-bottom: 1px solid var(--docs-border);
vertical-align: top;
overflow-wrap: anywhere;
}
.docs-content th:not(:where(.not-prose, .not-prose *)) {
text-align: left;
font-weight: 500;
white-space: normal;
background: var(--default-soft);
}
.docs-content td:not(:where(.not-prose, .not-prose *)) {
line-height: 1.75;
}
.docs-content :is(th, td):first-child:not(:where(.not-prose, .not-prose *)) {
padding-left: 0;
}
.docs-content :is(th, td):not(:where(.not-prose, .not-prose *)) code {
white-space: normal;
overflow-wrap: anywhere;
}
.docs-content :is(.custom-block, blockquote) {
border: 1px solid var(--docs-border);
background: var(--default-soft);
padding: 12px 16px;
border-radius: 12px;
margin: 20px 0;
}
.custom-block-title {
font-weight: 500;
}
.docs-content div[class*="language-"] > .copy {
display: grid;
place-items: center;
position: absolute;
z-index: 1;
top: 6px;
right: 8px;
width: 30px;
min-width: 0;
height: 30px;
padding: 0;
border: 0;
border-radius: 6px;
background: transparent;
color: var(--muted);
line-height: 1;
}
.docs-content div[class*="language-"] > .copy:hover {
color: var(--foreground);
background: var(--default-soft);
}
.docs-content div[class*="language-"] > .copy svg {
display: block;
grid-area: 1/1;
}
.docs-content div[class*="language-"] > .copy .copied-icon,
.docs-content div[class*="language-"] > .copy.copied .copy-icon {
display: none;
}
.docs-content div[class*="language-"] > .copy.copied .copied-icon {
display: block;
}
/* Pinned component-preview-container: 350px preview followed by collapsed code. */
.component-preview-container {
position: relative;
width: 100%;
margin: 16px 0;
contain: content;
}
.preview {
display: flex;
align-items: center;
justify-content: center;
min-height: 350px;
padding: 40px;
border: 1px solid var(--separator);
border-bottom: 0;
border-radius: 12px 12px 0 0;
isolation: isolate;
}
.preview-only {
border-bottom: 1px solid var(--separator);
border-radius: 12px;
}
.demo-row {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
gap: 12px;
width: 100%;
min-width: 0;
}
@layer components {
.preview .demo-row > *,
.preview [data-slot="card"] {
max-width: 100%;
min-width: 0;
}
}
.preview-description {
color: var(--muted);
font-size: 14px;
}
.code-section {
position: relative;
border: 1px solid var(--separator);
border-radius: 0 0 12px 12px;
padding-bottom: 44px;
overflow: hidden;
}
.code-section .preview-copy {
position: absolute;
right: 8px;
top: 8px;
z-index: 2;
width: 30px;
height: 30px;
min-width: 0;
color: var(--muted);
}
.code-section .preview-expand {
position: absolute;
left: 50%;
bottom: 8px;
transform: translateX(-50%);
font-size: 12px;
box-shadow: 0 1px 2px rgb(0 0 0 / 5%);
}
.highlighted-source {
max-height: 480px;
overflow: auto;
scrollbar-width: thin;
}
.code-section[data-expanded="false"] {
height: 150px;
padding-bottom: 0;
}
.code-section[data-expanded="false"] .highlighted-source {
max-height: 150px;
overflow: hidden;
mask-image: linear-gradient(#000 35%, transparent 90%);
pointer-events: none;
user-select: none;
}
.docs-content .highlighted-source div[class*="language-"] {
margin: 0;
border: 0;
border-radius: 0;
background: transparent;
}
.highlighted-source .lang,
.highlighted-source .copy {
display: none !important;
}
.docs-content .highlighted-source pre {
padding: 20px 44px 20px 20px;
overflow: visible;
max-height: none;
}
/* Legacy examples keep their original sizing helpers. */
.basic-input {
width: 16rem;
}
.input-stack {
display: flex;
flex-direction: column;
gap: 8px;
width: 240px;
}
.controlled-input {
display: flex;
flex-direction: column;
gap: 8px;
width: 320px;
}
.controlled-input > span {
font-size: 14px;
color: var(--muted);
padding: 0 4px;
}
.surface-demo {
padding: 24px;
background: var(--surface);
border-radius: 24px;
width: 320px;
}
.acme-card {
width: 400px;
}
.card-symbol {
font-size: 24px;
font-weight: 500;
line-height: 1;
}
.docs-content .demo-link {
font-size: 14px;
color: var(--link);
text-decoration: none;
text-underline-offset: 4px;
}
.docs-content .demo-link:hover {
text-decoration: underline;
}
.variant-card {
width: 180px;
}
.horizontal-card {
display: grid;
grid-template-columns: 32px 1fr;
}
.horizontal-card .hv-card__footer {
grid-column: 2;
}
.preview
:is(
.acme-card,
.basic-input,
.controlled-input,
.input-stack,
.surface-demo
) {
max-width: 100%;
}
.sr-only {
position: absolute !important;
width: 1px !important;
height: 1px !important;
padding: 0 !important;
margin: -1px !important;
overflow: hidden !important;
clip: rect(0, 0, 0, 0) !important;
white-space: nowrap !important;
border: 0 !important;
}
@media (max-width: 639px) {
.preview {
padding: 16px;
}
.docs-content pre {
padding: 18px;
font-size: 12px;
}
.docs-content :is(h2, h3, h4) {
overflow-wrap: anywhere;
}
.docs-content :is(th, td):not(:where(.not-prose, .not-prose *)) {
padding: 12px 8px;
}
}