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

1125 lines
21 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;
}
button,
input {
font: inherit;
}
@layer base {
a {
color: inherit;
text-decoration: none;
}
}
button {
cursor: pointer;
}
.docs-layout {
max-width: 1400px;
margin: auto;
}
.docs-nav {
height: 72px;
display: flex;
align-items: center;
gap: 18px;
padding: 0 28px;
position: sticky;
top: 0;
z-index: 20;
background: var(--background);
border-bottom: 1px solid var(--docs-border);
}
.brand {
font-size: 25px;
font-weight: 800;
letter-spacing: -1.4px;
display: flex;
align-items: center;
gap: 10px;
}
.brand span {
font-size: 12px;
letter-spacing: 0;
font-weight: 500;
background: var(--default);
padding: 3px 7px;
border-radius: 6px;
}
.version {
font-size: 12px;
color: var(--muted);
}
.docs-nav nav {
display: flex;
gap: 24px;
margin-left: 28px;
font-size: 14px;
color: var(--muted);
}
.docs-nav nav a.active {
color: var(--foreground);
}
.nav-tools {
display: flex;
align-items: center;
gap: 14px;
margin-left: auto;
}
.theme-toggle {
border: 0;
border-radius: 50%;
width: 32px;
height: 32px;
background: var(--default);
font-size: 20px;
}
.mobile-menu {
display: none;
}
.docs-body {
display: grid;
grid-template-columns: 248px minmax(0, 1fr) 200px;
}
.docs-sidebar {
padding: 24px 18px;
position: sticky;
top: 72px;
height: calc(100dvh - 72px);
overflow: auto;
border-right: 1px solid var(--docs-border);
}
.framework {
display: flex;
align-items: center;
gap: 10px;
border: 1px solid var(--docs-border);
border-radius: 12px;
padding: 12px;
font-size: 14px;
font-weight: 500;
margin-bottom: 28px;
}
.vue-mark {
font-weight: 700;
color: #42b883;
}
.framework-note {
margin-left: auto;
font-size: 12px;
color: var(--muted);
}
.docs-sidebar section {
margin-bottom: 26px;
}
.docs-sidebar h2 {
font-size: 13px;
font-weight: 600;
margin: 0 0 10px;
padding-left: 10px;
}
.docs-sidebar section a {
display: block;
font-size: 14px;
padding: 8px 12px;
color: var(--muted);
border-radius: 8px;
}
.docs-sidebar section a.selected {
background: var(--default);
color: var(--foreground);
font-weight: 500;
}
.docs-sidebar section a:hover {
color: var(--foreground);
}
.community {
font-size: 11px;
line-height: 1.8;
color: var(--muted);
padding: 14px 10px;
}
.docs-main {
min-width: 0;
padding: 36px 40px 80px;
max-width: 900px;
width: 100%;
margin: auto;
}
.breadcrumb {
display: flex;
align-items: center;
gap: 10px;
font-size: 13px;
color: var(--muted);
margin-bottom: 22px;
}
.breadcrumb span {
opacity: 0.5;
}
h1 {
font-size: 32px;
font-weight: 600;
line-height: 1.25;
letter-spacing: -1px;
margin: 0 0 12px;
}
.page-description {
font-size: 16px;
color: var(--muted);
line-height: 1.75;
margin: 0;
}
.source-links {
display: flex;
gap: 8px;
margin: 18px 0 34px;
}
.source-links a {
font-size: 12px;
line-height: 1.5;
border: 1px solid var(--docs-border);
padding: 5px 9px;
border-radius: 7px;
color: var(--muted);
}
.source-links a:hover {
color: var(--foreground);
background: var(--default);
}
.docs-content {
font-size: 14px;
line-height: 1.85;
}
.docs-content h2:not(:where(.not-prose, .not-prose *)) {
font-size: 23px;
font-weight: 600;
letter-spacing: -0.5px;
line-height: 1.4;
margin: 42px 0 20px;
}
.docs-content h3:not(:where(.not-prose, .not-prose *)) {
font-size: 18px;
font-weight: 500;
line-height: 1.5;
margin: 32px 0 16px;
}
.docs-content p:not(:where(.not-prose, .not-prose *)) {
margin: 16px 0;
}
.docs-content ul:not(:where(.not-prose, .not-prose *)) {
list-style: disc;
padding-left: 22px;
}
.docs-content li:not(:where(.not-prose, .not-prose *)) {
margin: 6px 0;
}
.docs-content
a:not(.header-anchor):not(.demo-link):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 h2:hover .header-anchor,
.docs-content h3:hover .header-anchor {
opacity: 1;
}
.docs-content :not(pre) > code {
background: var(--default);
border-radius: 5px;
padding: 2px 5px;
font-size: 12px;
}
.docs-content div[class*="language-"] {
position: relative;
border: 1px solid var(--docs-border);
border-radius: 10px;
background: var(--surface);
margin: 16px 0;
}
.docs-content div[class*="language-"] > .lang {
position: absolute;
right: 12px;
top: 6px;
font-size: 11px;
color: var(--muted);
}
.docs-content pre {
overflow: auto;
padding: 22px;
margin: 0;
font-family: ui-monospace, SFMono-Regular, monospace;
font-size: 12px;
line-height: 1.8;
}
.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;
}
.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 th:not(:where(.not-prose, .not-prose *)) {
text-align: left;
font-weight: 500;
color: var(--muted);
white-space: normal;
}
.docs-content th:not(:where(.not-prose, .not-prose *)),
.docs-content 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:first-child:not(:where(.not-prose, .not-prose *)),
.docs-content 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 .custom-block {
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-toc {
position: sticky;
top: 72px;
height: calc(100dvh - 72px);
overflow: auto;
padding: 42px 20px;
font-size: 12px;
}
.docs-toc p {
font-weight: 500;
margin: 0 0 14px;
}
.docs-toc a {
display: block;
color: var(--muted);
padding: 6px 0;
line-height: 1.5;
}
.docs-toc a.nested {
padding-left: 12px;
}
.docs-toc a:hover {
color: var(--foreground);
}
.docs-footer {
font-size: 12px;
color: var(--muted);
border-top: 1px solid var(--docs-border);
padding-top: 24px;
margin-top: 60px;
}
.component-preview-container {
margin: 16px 0 24px;
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;
}
.demo-row {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
gap: 12px;
width: 100%;
}
.code-section {
border: 1px solid var(--separator);
border-radius: 0 0 12px 12px;
overflow: hidden;
}
.code-toolbar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 16px;
font-size: 12px;
color: var(--muted);
}
.code-toolbar > div {
display: flex;
gap: 16px;
}
.code-toolbar button {
font-size: 12px;
background: none;
border: 0;
color: inherit;
padding: 3px 0;
}
.demo-source {
background: var(--surface);
border-top: 1px solid var(--separator);
max-height: 380px;
}
.docs-content .demo-source code {
white-space: pre;
}
.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;
}
.skip {
position: fixed;
top: -50px;
left: 16px;
z-index: 50;
padding: 8px 12px;
background: var(--surface);
}
.skip:focus {
top: 8px;
}
button:focus-visible,
a:focus-visible {
outline: 2px solid var(--focus);
outline-offset: 3px;
}
@media (max-width: 1150px) {
.docs-body {
grid-template-columns: 230px minmax(0, 1fr);
}
.docs-toc {
display: none;
}
.docs-main {
padding: 32px;
}
}
@media (max-width: 760px) {
.docs-nav {
height: 64px;
padding: 0 18px;
gap: 10px;
}
.docs-nav nav,
.version,
.search {
display: none;
}
.mobile-menu {
display: block;
border: 0;
background: none;
color: var(--foreground);
}
.docs-body {
display: block;
}
.docs-sidebar {
display: none;
}
.docs-sidebar.open {
display: block;
position: fixed;
inset: 64px 0 0 0;
background: var(--background);
z-index: 15;
height: auto;
}
.docs-main {
padding: 28px 20px 60px;
}
.preview {
padding: 20px;
min-height: 300px;
}
h1 {
font-size: 28px;
}
.variant-card {
width: 100%;
}
.docs-content table:not(:where(.not-prose, .not-prose *)) {
font-size: 12px;
}
}
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
}
/* Reading layout and controls: keep the reference structure without crowding the content. */
.docs-body {
grid-template-columns: 240px minmax(0, 1fr) 192px;
align-items: start;
}
.docs-main {
padding: 36px 44px 64px;
max-width: 824px;
margin: 0 auto;
}
.docs-toc {
padding: 40px 16px 32px;
border-left: 1px solid var(--docs-border);
margin-top: 32px;
top: 104px;
height: calc(100dvh - 136px);
}
.docs-toc a {
border-left: 1px solid var(--docs-border);
padding-left: 12px;
margin-left: 1px;
}
.docs-toc a.nested {
padding-left: 24px;
}
.docs-toc a.current {
border-color: var(--foreground);
color: var(--foreground);
font-weight: 500;
}
.docs-content {
font-size: 14px;
line-height: 1.8;
}
.docs-content h2:not(:where(.not-prose, .not-prose *)) {
font-size: 22px;
margin-top: 40px;
}
.docs-content h3:not(:where(.not-prose, .not-prose *)) {
font-size: 17px;
margin-top: 30px;
}
.docs-content th:not(:where(.not-prose, .not-prose *)) {
color: var(--foreground);
background: var(--default-soft);
}
.docs-content td:not(:where(.not-prose, .not-prose *)) {
line-height: 1.75;
}
.docs-content pre {
font-size: 13px;
line-height: 1.7;
tab-size: 2;
scrollbar-width: thin;
}
.preview {
min-height: 280px;
background: var(--background);
isolation: isolate;
}
.component-preview-container[data-name^="card-"] .preview {
min-height: 350px;
}
.demo-row {
min-width: 0;
}
@layer components {
.preview .demo-row > *,
.preview [data-slot="card"] {
max-width: 100%;
min-width: 0;
}
}
.preview .acme-card,
.preview .basic-input,
.preview .controlled-input,
.preview .input-stack,
.preview .surface-demo {
max-width: 100%;
}
.code-toolbar {
padding: 6px 12px;
background: var(--default-soft);
min-height: 46px;
}
.code-language {
display: flex;
align-items: center;
gap: 7px;
font-size: 12px;
}
.code-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: #42b883;
}
.code-toolbar > div {
gap: 4px;
}
.code-toolbar button {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
min-height: 34px;
padding: 6px 9px;
border-radius: 6px;
}
.code-toolbar button:hover {
color: var(--foreground);
background: var(--default);
}
.copy-feedback {
margin: 0 !important;
padding: 4px 16px 8px;
font-size: 12px;
color: var(--muted);
}
.highlighted-source {
max-height: 430px;
overflow: auto;
border-top: 1px solid var(--separator);
background: var(--surface);
scrollbar-width: thin;
}
.docs-content .highlighted-source div[class*="language-"] {
border: 0;
border-radius: 0;
margin: 0;
background: transparent;
}
.highlighted-source .lang,
.highlighted-source .copy {
display: none !important;
}
.docs-content .highlighted-source pre {
max-height: none;
overflow: visible;
}
.docs-content div[class*="language-"] > .copy {
display: grid;
place-items: center;
position: absolute;
z-index: 1;
top: 6px;
right: 8px;
width: 30px;
height: 30px;
padding: 0;
border: 1px solid var(--docs-border);
border-radius: 6px;
background: var(--surface);
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:focus-visible {
outline: 2px solid var(--focus);
outline-offset: 2px;
}
.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;
}
.docs-content div[class*="language-"] > .lang {
right: 48px;
top: 9px;
}
.docs-content .custom-block {
line-height: 1.8;
}
.page-navigation {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
margin-top: 48px;
}
.page-navigation a {
display: flex;
flex-direction: column;
gap: 5px;
padding: 16px;
border: 1px solid var(--docs-border);
border-radius: 10px;
}
.page-navigation a:hover {
background: var(--default-soft);
border-color: var(--muted);
}
.page-navigation span {
font-size: 12px;
color: var(--muted);
}
.page-navigation strong {
font-size: 14px;
font-weight: 500;
}
.page-next {
grid-column: 2;
text-align: right;
}
.docs-footer {
margin-top: 28px;
font-size: 12px;
line-height: 1.8;
}
.theme-toggle,
.mobile-menu {
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
width: 36px;
height: 36px;
border-radius: 8px;
background: transparent;
color: var(--muted);
}
.theme-toggle:hover,
.mobile-menu:hover {
background: var(--default);
color: var(--foreground);
}
.mobile-menu {
display: none;
}
.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;
}
.search-trigger {
display: flex;
align-items: center;
gap: 9px;
border: 1px solid var(--docs-border);
border-radius: 9px;
background: var(--default-soft);
color: var(--muted);
padding: 7px 10px;
min-height: 36px;
font-size: 12px;
min-width: 220px;
}
.search-trigger kbd {
font-family: inherit;
font-size: 10px;
margin-left: auto;
background: var(--surface);
padding: 2px 5px;
border-radius: 4px;
border: 1px solid var(--docs-border);
}
.search-overlay,
.mobile-nav-overlay {
position: fixed;
inset: 0;
z-index: 50;
background: rgba(0, 0, 0, 0.35);
backdrop-filter: blur(3px);
}
.search-dialog {
position: fixed;
z-index: 51;
top: min(16vh, 120px);
left: 50%;
transform: translateX(-50%);
width: min(620px, calc(100vw - 32px));
border: 1px solid var(--docs-border);
border-radius: 16px;
background: var(--overlay);
box-shadow: var(--overlay-shadow);
overflow: hidden;
color: var(--foreground);
}
.search-field {
display: flex;
align-items: center;
padding: 8px 12px;
border-bottom: 1px solid var(--docs-border);
}
.search-field input {
flex: 1;
min-width: 0;
border: 0;
background: transparent;
padding: 12px;
font-size: 16px;
outline: none;
color: inherit;
}
.search-close {
padding: 5px 7px;
font-size: 11px;
border: 1px solid var(--docs-border);
border-radius: 5px;
background: var(--default-soft);
color: var(--muted);
}
.search-dialog .search-results {
position: static;
max-height: calc(65dvh - 100px);
overflow: auto;
width: 100%;
border: 0;
border-radius: 0;
box-shadow: none;
background: transparent;
padding: 8px;
}
.search-results a {
display: block;
padding: 12px;
border-radius: 9px;
border: 1px solid transparent;
color: var(--foreground);
}
.search-results a[aria-selected="true"] {
background: var(--default);
border-color: var(--docs-border);
}
.result-title {
display: flex;
gap: 10px;
font-size: 14px;
font-weight: 500;
align-items: center;
}
.result-title > span {
font-size: 12px;
font-weight: 400;
color: var(--muted);
}
.result-excerpt {
display: block;
margin-top: 5px;
font-size: 12px;
line-height: 1.6;
color: var(--muted);
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.search-empty {
font-size: 13px;
color: var(--muted);
padding: 28px 16px !important;
line-height: 1.8;
text-align: center;
}
.search-footer {
display: flex;
justify-content: space-between;
padding: 12px 18px;
font-size: 11px;
border-top: 1px solid var(--docs-border);
color: var(--muted);
}
.mobile-nav-dialog {
position: fixed;
z-index: 51;
inset: 0 auto 0 0;
width: min(340px, 88vw);
overflow: auto;
background: var(--background);
padding: 20px;
color: var(--foreground);
border-right: 1px solid var(--docs-border);
}
.mobile-nav-heading {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 24px;
font-size: 16px;
font-weight: 600;
}
.mobile-nav-heading button {
font-size: 26px;
background: none;
border: 0;
color: var(--muted);
width: 36px;
height: 36px;
}
.mobile-nav-dialog h2 {
font-size: 12px;
color: var(--muted);
font-weight: 500;
margin: 24px 10px 10px;
}
.mobile-nav-dialog nav a {
display: block;
padding: 12px;
border-radius: 8px;
font-size: 14px;
}
.mobile-nav-dialog a[aria-current="page"] {
background: var(--default);
font-weight: 500;
}
@media (max-width: 1150px) {
.docs-body {
grid-template-columns: 228px minmax(0, 1fr);
}
.docs-main {
padding: 32px;
max-width: 820px;
}
.docs-toc {
display: none;
}
}
@media (max-width: 960px) {
.docs-body {
display: block;
}
.docs-sidebar {
display: none;
}
.mobile-menu {
display: inline-flex;
}
.docs-main {
max-width: 780px;
padding: 32px 28px;
}
.docs-nav {
height: 64px;
padding: 0 24px;
}
.docs-nav nav {
margin-left: 8px;
}
.version {
display: none;
}
.nav-tools {
gap: 6px;
}
.search-trigger {
min-width: 180px;
}
.docs-content h2:not(:where(.not-prose, .not-prose *)) {
scroll-margin-top: 80px;
}
}
@media (max-width: 600px) {
.docs-nav {
padding: 0 16px;
}
.docs-nav nav {
display: none;
}
.brand {
font-size: 23px;
}
.brand span {
font-size: 11px;
}
.search-trigger {
min-width: 36px;
width: 36px;
height: 36px;
padding: 8px;
justify-content: center;
background: transparent;
border: 0;
}
.search-trigger span,
.search-trigger kbd {
display: none;
}
.docs-main {
padding: 26px 20px 48px;
}
.breadcrumb {
font-size: 12px;
margin-bottom: 18px;
}
.docs-main > h1 {
font-size: 28px;
line-height: 1.35;
}
.page-description {
font-size: 14px;
}
.source-links {
margin-bottom: 28px;
}
.source-links a {
font-size: 11px;
}
.preview {
min-height: 230px;
padding: 24px 16px;
}
.component-preview-container[data-name^="card-"] .preview {
min-height: 280px;
}
.code-toolbar button {
font-size: 11px;
gap: 4px;
padding: 6px;
}
.docs-content pre {
font-size: 12px;
padding: 18px;
}
.docs-content td,
.docs-content th {
padding: 12px 10px;
}
.search-dialog {
top: 12px;
width: calc(100vw - 24px);
}
.search-trigger kbd {
display: none;
}
.page-navigation a {
padding: 12px;
}
.page-navigation strong {
font-size: 13px;
}
}
@media (max-width: 600px) {
.theme-toggle,
.mobile-menu,
.search-trigger {
width: 40px;
height: 40px;
}
.docs-content h2,
.docs-content h3 {
overflow-wrap: anywhere;
}
}