Files
Liu 747a222fcc feat(styles): follow the accent in focus rings and app fills
- generate focus box-shadow overrides from the accent primary color
- add the fill-primary class for app-level primary fills
- use it for the doc-viewer payout progress bar
2026-11-22 20:11:20 +08:00

1487 lines
28 KiB
CSS

/* LCUI Documentation Viewer - Global styles
*
* Hand-maintained. Loaded into the doc-viewer via `import "./global.css"`
* in app/layout.tsx; lcui-cli converts this file to app/global.css.h on
* each build and the runtime registers the rules via
* `ui_load_css_string`.
*
* Tailwind utilities are reused through @apply where possible so the
* spacing / typography scale stays consistent with any inline tailwind
* class an MDX-derived page widget might emit.
*/
@tailwind components;
@tailwind utilities;
/* Geist ships variable TTF files (wght 100-900), which FreeType can load
* directly. The lcui-cli asset loader copies each file into dist/assets and
* preloads it with pd_font_library_load_file() before the UI starts. */
@font-face {
font-family: "Geist";
src: url("../node_modules/geist/dist/fonts/geist-sans/Geist-Variable.ttf");
}
@font-face {
font-family: "Geist Mono";
src: url("../node_modules/geist/dist/fonts/geist-mono/GeistMono-Variable.ttf");
}
* {
box-sizing: border-box;
}
.typeset {
@apply text-foreground dark:text-foreground-dark;
font-family: "Geist", "Noto Sans SC", sans-serif;
}
root {
min-width: 800px;
min-height: 480px;
@apply bg-background text-base text-foreground;
}
.dark {
@apply bg-background-dark text-foreground-dark;
}
textinput {
min-width: 20px;
}
/* -- Page -- */
.doc-page {
@apply px-4 py-8 max-w-3xl mx-auto;
}
.doc-page-desc {
@apply text-lg text-muted-foreground mb-6 leading-relaxed;
@apply dark:text-muted-foreground-dark;
}
.doc-section {
@apply mb-8;
}
/* -- Locale-controlled visibility --
*
* Any element that should only appear when a specific locale is active
* on ui_root() gets both `.lang` and the matching locale class.
* `.lang` hides by default; the override below shows it when the root
* locale matches. Components like sidebar and code-block-copy share
* this pattern. */
.lang {
display: none;
}
.en .lang.en,
.zh-CN .lang.zh-CN {
display: block;
}
/* -- Semantic typography (h1-h6, p) --
*
* These are registered as `text` widget aliases in app/main.c. Each
* tag maps to a tailwind size on the default type scale; p shares the
* h6 size and is distinguished only by weight.
*
* `text-*` utilities also emit a paired line-height (e.g. text-4xl is
* 36px/40px). That is tighter than the semantic 1.4 and, because text
* baselines are laid out from the font ascent/descent, it clips the
* descenders of single-line titles. Tailwind has no "unset" for the
* paired line-height, so every heading appends `leading-[1.4]` right
* after its `text-*` utility; @apply keeps declaration order, so the
* later line-height wins inside the same rule. */
h1, h2, h3, h4, h5, h6 {
@apply font-bold text-foreground;
@apply dark:text-foreground-dark;
}
h1 {
@apply text-4xl mb-4 leading-[1.4];
}
h2 {
@apply text-3xl mt-8 mb-3 leading-[1.4];
}
h3 {
@apply text-2xl mt-6 mb-2 leading-[1.4];
}
h4 {
@apply text-xl mt-6 mb-2 leading-[1.4];
}
h5 {
@apply text-lg mt-4 mb-2 leading-[1.4];
}
h6 {
@apply text-base mt-4 mb-2 leading-[1.4];
}
p {
@apply text-base text-foreground mb-3 leading-relaxed;
@apply dark:text-foreground-dark;
}
/* -- Code block card --
*
* Light-themed card: a 1px border with rounded corners, a gray header
* carrying the file name (or language) plus a clickable Copy button,
* and a white body with one <Text> per source line. Both the demo
* code blocks and MDX-derived fenced blocks share this structure
* (see scripts/compiler/page-generator.ts). */
.code-block {
@apply rounded border border-code-border my-4 bg-code;
@apply dark:border-code-border-dark dark:bg-code-dark;
}
.code-block-header {
@apply flex flex-row items-center pl-3 pr-1 py-1 bg-code-header border-b border-code-border min-h-[36px];
@apply dark:bg-code-header-dark dark:border-code-border-dark;
}
.code-block-title {
@apply flex-1 text-sm text-code-foreground;
@apply dark:text-code-foreground-dark;
}
.code-block-copy {
position: absolute;
top: 8px;
right: 8px;
@apply flex gap-1 items-center px-2 py-1 text-sm text-code-foreground cursor-pointer rounded;
@apply dark:text-code-foreground-dark;
}
.code-block-copy text {
white-space: nowrap;
}
.code-block-copy .copy-icon,
.code-block-copy .check-icon {
position: relative;
top: 1px;
}
.code-block-copy .check-icon {
display: none;
}
.code-block-copy.copied .copy-icon {
display: none;
}
.code-block-copy.copied .check-icon {
display: inline-block;
}
.code-block-copy:hover {
@apply bg-muted text-foreground;
@apply dark:bg-muted-dark dark:text-foreground-dark;
}
.code-block-body {
@apply text-sm text-code-foreground whitespace-pre;
@apply dark:text-code-foreground-dark;
position: relative;
font-family: "Geist Mono", monospace;
}
.code-block-scroll {
width: 100%;
}
.code-block-scroll-content {
box-sizing: border-box;
padding: 12px;
}
.code-block-lines {
display: flex;
flex-direction: column;
}
.code-block-lines-dark {
display: none;
}
.dark .code-block-lines-light {
display: none;
}
.dark .code-block-lines-dark {
display: flex;
}
.code-line-row {
display: flex;
align-items: flex-start;
}
.code-line-number {
@apply text-muted-foreground;
@apply dark:text-muted-foreground-dark;
flex-shrink: 0;
width: 40px;
padding-right: 12px;
text-align: right;
line-height: 20px;
font-family: "Geist Mono", monospace;
}
.code-line {
@apply text-code-foreground;
@apply dark:text-code-foreground-dark;
flex: 0 0 auto;
line-height: 20px;
white-space: nowrap;
font-family: "Geist Mono", monospace;
}
/* -- Demo widget (see app/components/demo-provider.tsx) -- */
.demo {
@apply mb-6;
}
.demo-preview {
@apply px-6 py-8 bg-card border rounded-tl-md rounded-tr-md border-border flex items-center justify-center min-h-[128px];
@apply dark:bg-card-dark dark:border-border-dark;
}
.demo .code-block {
@apply rounded-tr-none rounded-tl-none border-t-0 my-0;
}
/* -- Widget demos -- */
.badge-basic-demo,
.badge-variants-demo,
.badge-colors-demo {
@apply flex flex-wrap gap-2;
}
.alert-variants-demo,
.alert-basic-demo {
@apply block w-full max-w-md;
}
.alert-destructive-demo,
.alert-action-demo {
@apply w-full max-w-md;
}
.item-basic-demo,
.item-variants-demo,
.item-size-demo,
.item-icon-demo,
.item-image-demo {
@apply flex max-w-md flex-col gap-6;
}
.item-duration {
@apply text-xs text-muted-foreground;
}
.button-basic-demo,
.button-variants-demo,
.button-icon-demo,
.button-with-icon-demo,
.button-size-demo,
.button-disabled-demo {
@apply flex flex-wrap items-center gap-4;
}
.select-basic-demo,
.select-groups-demo,
.select-disabled-demo,
.select-align-item-demo {
@apply w-full max-w-48;
}
.select-scrollable-demo {
@apply w-full max-w-64;
}
.checkbox-basic-demo {
@apply max-w-sm;
}
.checkbox-description-demo {
@apply max-w-72;
}
.checkbox-group-demo {
@apply w-full max-w-sm;
}
.checkbox-group-demo field-group {
@apply gap-3;
}
.checkbox-indeterminate-demo {
@apply flex flex-col gap-2;
}
.checkbox-indeterminate-demo .checkbox-row {
@apply flex items-center gap-2;
}
.field-demo {
@apply flex flex-col gap-5 max-w-[400px];
padding: 4px;
margin: -4px;
}
/* FieldLabel follows shadcn's `cn-label` (text-sm font-medium); examples that
* use a checkbox/radio as the control opt back into normal weight, mirroring
* the `className="font-normal"` in shadcn's field examples. */
.field-label.font-normal {
font-weight: 400;
}
/* field-basic uses a 3-column card row, so give it a bit more room. */
.field-demo.field-basic-demo {
@apply max-w-[448px];
}
.radio-group-demo {
@apply flex w-full max-w-[400px] flex-col;
}
.progress-label-demo {
@apply w-full max-w-[400px];
}
.tooltip-sides-demo {
@apply flex flex-wrap gap-2;
}
.popover-align-demo {
@apply flex flex-wrap gap-2;
}
.toast-demo-row {
@apply flex flex-wrap gap-2;
}
.card-basic-demo,
.card-image-demo {
width: 384px;
}
.card-image-demo {
padding-top: 0;
}
.card-image-cover {
position: relative;
width: 100%;
height: 216px;
@apply bg-card-image-cover;
@apply dark:bg-card-image-cover-dark;
border-top-left-radius: 12px;
border-top-right-radius: 12px;
}
.card-image-overlay {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
@apply bg-card-image-overlay;
@apply dark:bg-card-image-overlay-dark;
}
.card-small-demo {
width: 320px;
}
.card-small-list {
@apply flex flex-col gap-2 py-2;
}
.card-small-row {
@apply flex gap-2;
}
.card-small-row text {
flex: 1;
}
.card-small-chevron {
@apply text-muted-foreground;
margin-top: 2px;
}
.card-basic-demo .card-form {
@apply flex flex-col gap-6;
}
.card-basic-demo .card-field {
@apply flex flex-col gap-2;
}
.card-basic-demo .card-field textinput {
width: 100%;
}
.card-basic-demo .card-label-row {
@apply flex items-center;
}
.card-basic-demo .card-forgot {
@apply ml-auto text-sm;
color: inherit;
}
.card-footer-stack {
flex-direction: column;
gap: 8px;
}
.card-footer-stack button {
width: 100%;
}
.popover-form-grid {
@apply flex flex-col gap-2;
/* clip-safe supplies the 4px focus-ring gutter; keep the original visual
* 12px offset above the grid (8px margin + 4px padding). */
margin-top: 8px;
}
.popover-form-grid field {
gap: 16px;
}
.popover-form-grid field-label {
flex: 1;
min-width: 0;
}
.popover-form-input {
flex: 2;
min-width: 0;
}
.field-checkbox-demo-group {
@apply gap-3;
}
.field-basic-card-row {
@apply flex gap-4;
padding: 4px;
margin: -4px;
}
.field-basic-card-field {
@apply flex-1;
}
.anchor-basic-demo:hover {
@apply text-admonition-note underline underline-offset-2;
@apply dark:text-admonition-note-dark;
}
.button-size-group {
@apply flex items-center gap-2;
}
.empty-basic-demo {
@apply w-full max-w-[400px];
}
.empty-background-demo {
@apply h-full w-full bg-muted/30;
}
/* The code-block wrapper holds the shared card chrome. Inner code
* block bodies are siblings of the header and carry data attributes
* for language/file/source selection. */
/* The header uses flex so that the file tab group, the language tab
* group, and the copy button share a single row. Both tab groups are
* flex containers themselves: laying their tabs out as inline-block
* made the language group wrap whenever flex width distribution handed
* it one pixel less than its max-content width, which pushed TSX onto a
* second row after selecting a language with two files. */
.code-block-header .demo-files {
flex: 1;
min-width: 0;
}
.code-block-header .demo-languages,
.code-block-header .demo-files {
@apply px-1 py-1;
display: flex;
align-items: center;
}
.demo .code-block-header {
@apply px-1;
}
.demo-tab {
display: inline-block;
@apply px-2 py-1 text-sm rounded-lg mr-1 cursor-pointer;
}
.demo-tab:hover {
@apply bg-foreground/10;
@apply dark:bg-foreground-dark/10;
}
.demo-tab.active {
box-shadow: theme("boxShadow.sm");
@apply text-foreground font-bold bg-card;
@apply dark:text-foreground-dark dark:bg-card-dark;
}
/* -- Lists (ol/ul/li) --
*
* ol/ul are registered as native widgets in app/components/list.c.
* Each li has an absolutely-positioned marker child created in C
* (class .list-marker). The container's padding-left is set per-li
* at runtime in px (LCUI does not currently support em on padding).
* The defaults below apply when no inline override is present. */
ol,
ul {
display: block;
@apply my-3;
}
li {
display: block;
position: relative;
padding-left: 20px;
@apply text-base text-foreground mb-1;
@apply dark:text-foreground-dark;
}
.list-marker {
position: absolute;
left: 0;
top: 0;
@apply text-muted-foreground;
@apply dark:text-muted-foreground-dark;
}
/* -- Admonitions (:::note / :::info / :::tip / :::caution / :::warning)
*
* Docusaurus-style admonition containers rendered by
* page-generator.ts. Each admonition is a rounded container with a
* coloured left border and a bold title that takes its colour from
* the admonition type. The generator recurses into the body so
* admonitions can contain paragraphs, lists, fenced code blocks,
* and other admonitions. */
.admonition {
display: block;
@apply my-4 py-3 px-4 rounded border-l-4 bg-muted;
@apply dark:bg-muted-dark;
}
.admonition-note {
@apply border-l-admonition-note;
@apply dark:border-l-admonition-note-dark;
}
.admonition-info {
@apply border-l-admonition-info;
@apply dark:border-l-admonition-info-dark;
}
.admonition-tip {
@apply border-l-admonition-tip;
@apply dark:border-l-admonition-tip-dark;
}
.admonition-caution {
@apply border-l-admonition-caution;
@apply dark:border-l-admonition-caution-dark;
}
.admonition-warning {
@apply border-l-admonition-warning;
@apply dark:border-l-admonition-warning-dark;
}
.admonition-title {
@apply font-bold mb-1;
}
.admonition-note .admonition-title {
@apply text-admonition-note-foreground;
@apply dark:text-admonition-note-foreground-dark;
}
.admonition-info .admonition-title {
@apply text-admonition-info-foreground;
@apply dark:text-admonition-info-foreground-dark;
}
.admonition-tip .admonition-title {
@apply text-admonition-tip-foreground;
@apply dark:text-admonition-tip-foreground-dark;
}
.admonition-caution .admonition-title {
@apply text-admonition-caution-foreground;
@apply dark:text-admonition-caution-foreground-dark;
}
.admonition-warning .admonition-title {
@apply text-admonition-warning-foreground;
@apply dark:text-admonition-warning-foreground-dark;
}
.admonition-content p,
.admonition-content ul,
.admonition-content ol {
@apply my-1;
}
/* -- Markdown tables (-- generated by scripts/compiler/page-generator.ts)
*
* LCUI does not support display: table, so every markdown table is
* emitted as a vertical stack of horizontal flex rows. Each cell is
* a widget with either a fixed width (for short, label-style columns)
* or flex-grow (for the last "description" column). A minimum width
* is applied so empty cells do not collapse. */
.mdx-table {
display: block;
@apply my-4 rounded border border-border bg-card;
@apply dark:border-border-dark dark:bg-card-dark;
}
.mdx-table-row {
display: flex;
flex-direction: row;
}
.mdx-table-head {
@apply bg-muted border-b border-border;
@apply dark:bg-muted-dark dark:border-border-dark;
}
.mdx-table-cell {
@apply px-3 py-2 text-sm text-foreground;
@apply dark:text-foreground-dark;
}
.mdx-table-head-cell {
@apply font-bold text-foreground;
@apply dark:text-foreground-dark;
}
/* -- DropdownMenu demos --
*
* The demo previews mount their menus through a Portal, so these rules
* are keyed by a unique class on each menu content instead of a
* descendant selector rooted at the demo container.
*/
.dropdown-menu-demo-content { width: 160px; }
.dropdown-menu-basic-demo-content { width: 160px; }
.dropdown-menu-checkboxes-demo-content { width: 160px; }
.dropdown-menu-checkboxes-icons-demo-content { width: 224px; }
.dropdown-menu-radio-group-demo-content { width: 128px; }
.dropdown-menu-radio-icons-demo-content { width: 224px; }
.dropdown-menu-icons-demo-content { width: 160px; }
.dropdown-menu-complex-demo-content { width: 176px; }
.dropdown-menu-avatar-trigger {
width: 40px;
height: 40px;
padding: 0;
border-radius: 20px;
}
.sidebar-team-menu,
.sidebar-user-menu,
.sidebar-team-menu dropdown-menu-trigger,
.sidebar-user-menu dropdown-menu-trigger {
display: block;
width: 100%;
}
.sidebar-team-menu-content,
.sidebar-user-menu-content {
width: 224px;
}
.sidebar-user-menu-email {
display: block;
padding: 0 8px 6px;
@apply text-muted-foreground dark:text-muted-foreground-dark;
font-size: 12px;
}
/* -- Sidebar demos -- */
.sidebar-basic-demo {
display: flex;
width: 100%;
height: 500px;
@apply border border-border dark:border-border-dark;
border-radius: 8px;
}
.sidebar-basic-demo .sidebar-main {
display: flex;
flex-direction: column;
flex: 1;
gap: 8px;
padding: 12px;
}
.sidebar-basic-demo .sidebar-team {
height: 48px;
padding: 8px;
}
.sidebar-basic-demo .sidebar-user {
height: 46px;
padding: 8px;
}
.sidebar-basic-demo .sidebar-menu-text {
display: flex;
flex-direction: column;
flex: 1;
min-width: 0;
gap: 2px;
}
.sidebar-basic-demo .sidebar-menu-name {
display: block;
font-size: 13px;
font-weight: 500;
}
.sidebar-basic-demo .sidebar-menu-meta {
display: block;
font-size: 11px;
@apply text-muted-foreground dark:text-muted-foreground-dark;
}
.sidebar-basic-demo .sidebar-scroll {
flex: 1;
min-height: 0;
width: 100%;
}
.sidebar-basic-demo .sidebar-sub-button {
height: 28px;
padding-left: 16px;
}
.sidebar-collapsed-demo {
display: flex;
width: 100%;
height: 360px;
@apply border border-border dark:border-border-dark;
border-radius: 8px;
}
.sidebar-collapsed-demo .sidebar-main {
display: flex;
flex-direction: column;
flex: 1;
gap: 8px;
padding: 12px;
}
.sidebar-collapsed-demo .sidebar-main-title {
display: block;
font-size: 16px;
font-weight: 600;
}
.sidebar-collapsed-demo .sidebar-main-copy {
display: block;
font-size: 13px;
@apply text-muted-foreground dark:text-muted-foreground-dark;
}
.sidebar-group-collapsible-demo {
display: flex;
width: 100%;
height: 360px;
@apply border border-border dark:border-border-dark;
border-radius: 8px;
}
.sidebar-group-collapsible-demo .sidebar-main {
display: flex;
flex-direction: column;
flex: 1;
gap: 8px;
padding: 12px;
}
.sidebar-group-collapsible-demo .sidebar-main-title {
display: block;
font-size: 16px;
font-weight: 600;
}
.sidebar-group-collapsible-demo .sidebar-main-copy {
display: block;
font-size: 13px;
@apply text-muted-foreground dark:text-muted-foreground-dark;
}
.breadcrumb-collapse-demo {
width: 320px;
}
.breadcrumb-demo {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
width: 100%;
}
.breadcrumb-demo-status {
@apply text-muted-foreground dark:text-muted-foreground-dark;
font-size: 13px;
}
.accordion-demo {
width: 512px;
}
.accordion-basic-demo {
width: 512px;
}
.accordion-multiple-demo {
width: 512px;
}
.accordion-disabled-demo {
width: 512px;
}
.accordion-borders-demo {
width: 512px;
@apply border border-border dark:border-border-dark;
border-radius: 8px;
}
.accordion-borders-item {
padding: 0 16px;
}
.accordion-card-demo {
width: 384px;
}
.accordion-custom-trigger-demo {
width: 512px;
}
.input-group-demo {
width: 320px;
}
.input-group-inline-start,
.input-group-inline-end,
.input-group-block-start,
.input-group-block-end {
width: 384px;
}
.input-group-mono {
font-family: "Geist Mono", monospace;
}
.input-group-block-start-action,
.input-group-block-end-action {
margin-left: auto;
}
.input-group-icon-demo,
.input-group-text-demo,
.input-group-button-demo,
.input-group-custom-demo {
display: flex;
flex-direction: column;
gap: 24px;
width: 384px;
}
.input-group-spinner-demo {
display: flex;
flex-direction: column;
gap: 16px;
width: 384px;
}
.input-group-dropdown-demo {
display: flex;
flex-direction: column;
gap: 16px;
width: 384px;
}
.input-group-kbd-demo {
width: 384px;
}
.input-group-textarea-demo {
width: 448px;
}
.input-group-textarea-demo .input-group-textarea {
min-height: 200px;
}
.input-group-spinner-icon {
width: 16px;
height: 16px;
}
.input-group-custom-control {
min-height: 64px;
}
.button-group-demo {
width: fit-content;
}
.button-group-size-demo {
display: flex;
flex-direction: column;
gap: 32px;
width: fit-content;
}
.button-group-nested-demo {
width: 384px;
}
.button-group-input-demo {
width: 320px;
}
.button-group-input-group-demo,
.button-group-select-demo {
width: 384px;
}
.button-group-dropdown-demo dropdown-menu-content {
width: 176px;
}
.popover-task-input {
min-height: 64px;
}
.sr-only {
position: absolute;
left: -10000px;
}
.button-group-popover-demo popover-title {
font-size: 14px;
}
/* -- Home ------------------------------------------------------------- */
.home-page {
display: flex;
flex-direction: column;
width: 100%;
}
.home-inner {
display: flex;
flex-direction: column;
width: 100%;
max-width: 1560px;
margin-left: auto;
margin-right: auto;
padding: 72px 48px 96px;
}
.home-hero {
display: flex;
flex-direction: column;
align-items: center;
}
.home-title {
font-size: 48px;
font-weight: 700;
line-height: 1.4;
}
.home-title-row {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
}
.home-title-badge {
white-space: nowrap;
}
.home-desc {
max-width: 720px;
margin-top: 12px;
font-size: 18px;
line-height: 1.6;
@apply text-muted-foreground dark:text-muted-foreground-dark;
text-align: center;
}
.home-cta {
display: flex;
flex-direction: row;
justify-content: center;
gap: 12px;
margin-top: 28px;
}
home-grid {
display: flex;
flex-direction: row;
align-items: flex-start;
gap: 24px;
margin-top: 56px;
}
home-column {
display: flex;
flex-direction: column;
flex: 1 1 0;
gap: 24px;
min-width: 0;
}
.home-card {
display: flex;
flex-direction: column;
gap: 0;
padding: 0;
@apply border border-border dark:border-border-dark;
border-radius: 14px;
@apply bg-card dark:bg-card-dark;
}
.home-card card-header {
gap: 12px;
padding: 0;
}
.home-card card-title {
font-size: 18px;
font-weight: 600;
line-height: 1.4;
}
.home-card card-description {
font-size: 13px;
line-height: 1.5;
@apply text-muted-foreground dark:text-muted-foreground-dark;
}
.home-card .home-card-body {
display: flex;
flex-direction: column;
gap: 12px;
padding: 20px;
}
.home-row {
display: flex;
flex-direction: row;
align-items: center;
gap: 8px;
}
.home-row-between {
justify-content: space-between;
}
.home-preview-desc {
font-size: 13px;
line-height: 1.5;
@apply text-muted-foreground dark:text-muted-foreground-dark;
}
/* Shared form pieces */
.home-card field {
gap: 6px;
}
.home-field-row {
display: flex;
flex-direction: row;
gap: 12px;
}
.home-field-half {
flex: 1 1 0;
min-width: 0;
}
.home-card field-label {
font-size: 13px;
font-weight: 600;
}
.home-field-link {
font-size: 11px;
@apply text-muted-foreground dark:text-muted-foreground-dark;
}
.home-input {
height: 36px;
padding-top: 7px;
padding-bottom: 7px;
}
.home-textarea {
height: 96px;
}
.home-block-button {
width: 100%;
justify-content: center;
}
/* Controls card */
.home-controls {
gap: 14px;
}
.home-controls .home-row {
flex-wrap: nowrap;
}
.home-controls button,
.home-controls .button {
flex-shrink: 0;
}
.home-controls radio-group {
flex-direction: row;
align-items: center;
}
/* Attachment card */
.home-attachment-card {
gap: 8px;
}
/* Savings targets card */
.home-goal {
display: flex;
flex-direction: column;
gap: 8px;
padding: 18px;
border-radius: 10px;
@apply bg-muted dark:bg-muted-dark;
}
.home-goal-label {
font-size: 11px;
@apply text-muted-foreground dark:text-muted-foreground-dark;
}
.home-goal-value {
font-size: 30px;
font-weight: 700;
line-height: 1.1;
}
.home-goal-progress {
height: 6px;
}
.home-goal-meta {
font-size: 12px;
@apply text-muted-foreground dark:text-muted-foreground-dark;
}
.home-goal-footer {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.home-goal-caption {
font-size: 12px;
@apply text-muted-foreground dark:text-muted-foreground-dark;
}
.home-goal-amount {
font-size: 12px;
font-weight: 500;
@apply text-foreground dark:text-foreground-dark;
}
/* Claimable balance card */
.home-claim-label {
font-size: 13px;
@apply text-muted-foreground dark:text-muted-foreground-dark;
}
.home-balance {
font-size: 34px;
font-weight: 700;
line-height: 1.1;
}
.home-dot {
width: 8px;
height: 8px;
border-radius: 4px;
@apply bg-warning dark:bg-warning-dark;
}
.home-summary {
display: flex;
flex-direction: column;
gap: 10px;
padding: 14px;
border-radius: 10px;
@apply bg-muted dark:bg-muted-dark;
}
.home-summary .home-row-between .home-summary-label {
flex: 1 1 0;
}
.home-summary .home-row-between .home-summary-value {
flex-shrink: 0;
white-space: nowrap;
}
.home-summary .home-row-between .home-summary-total {
flex-shrink: 0;
white-space: nowrap;
}
.home-summary-label {
font-size: 13px;
@apply text-muted-foreground dark:text-muted-foreground-dark;
}
.home-summary-value {
font-size: 13px;
}
.home-summary-total {
font-size: 13px;
font-weight: 600;
}
.home-divider {
height: 1px;
@apply bg-border dark:bg-border-dark;
}
/* Accordion and deployment cards */
.home-accordion {
gap: 10px;
}
.home-accordion accordion-trigger text {
flex: 1 1 0;
}
.home-deployment {
gap: 12px;
}
.home-deploy-live-dot {
width: 6px;
height: 6px;
border-radius: 3px;
@apply bg-success dark:bg-success-dark;
}
.home-deploy-progress {
display: flex;
flex-direction: column;
gap: 6px;
}
.home-deploy-environment {
font-size: 12px;
font-weight: 600;
@apply text-muted-foreground dark:text-muted-foreground-dark;
}
.home-deploy-percent {
font-size: 12px;
font-weight: 600;
}
.home-deploy-steps {
display: flex;
flex-direction: column;
gap: 4px;
}
.home-deploy-steps item {
padding-top: 6px;
padding-bottom: 6px;
}
.home-deploy-step-meta {
flex-shrink: 0;
font-size: 11px;
@apply text-muted-foreground dark:text-muted-foreground-dark;
}
.home-deploy-actions {
justify-content: space-between;
gap: 8px;
}
.home-deploy-redeploy {
flex-shrink: 0;
}
/* Milestone, payout and account cards */
.home-milestone,
.home-payout,
.home-account {
gap: 8px;
}
.home-account {
gap: 20px;
}
.home-payout .home-textarea {
height: 60px;
}
.home-payout-amount {
flex-shrink: 0;
white-space: nowrap;
font-size: 24px;
font-weight: 700;
line-height: 1.2;
}
.home-select {
width: 100%;
height: 36px;
justify-content: space-between;
}
.home-payout dropdown-menu,
.home-payout dropdown-menu-trigger {
width: 100%;
}
.home-slider {
height: 6px;
border-radius: 3px;
@apply bg-muted dark:bg-muted-dark;
}
.home-slider-fill {
width: 25%;
height: 6px;
border-radius: 3px;
}
.home-danger {
margin-top: 4px;
}
.home-danger item-media {
@apply text-destructive dark:text-destructive-dark;
}
/* Empty card */
.home-empty empty,
.home-empty empty-header,
.home-empty empty-content,
.home-empty button {
flex-shrink: 0;
}
.home-empty empty {
width: 100%;
}
.home-empty empty-header {
width: 100%;
}
.home-empty empty-title,
.home-empty empty-description {
text-align: center;
}
.home-empty empty-content {
width: 100%;
align-items: center;
}
.home-empty-icon {
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border-radius: 8px;
@apply bg-muted dark:bg-muted-dark;
}
.home-empty-icon icon {
top: 0;
height: 16px;
font-size: 16px;
line-height: 16px;
}
/* Notifications card */
.home-alerts {
gap: 12px;
}
.home-alert-row {
display: flex;
flex-direction: row;
align-items: flex-start;
gap: 10px;
}
/* Align the 16px control with the first text line instead of its box top. */
.home-alert-row checkbox {
margin-top: 2px;
}
.home-alert-text {
display: flex;
flex-direction: column;
flex: 1 1 auto;
gap: 2px;
}
.home-alert-title {
font-size: 13px;
font-weight: 600;
}
.home-alert-desc {
font-size: 12px;
line-height: 1.5;
@apply text-muted-foreground dark:text-muted-foreground-dark;
}
/* Shortcuts card */
.home-shortcuts {
gap: 10px;
}
.home-shortcuts breadcrumb {
width: 260px;
}
/* The vertical docs scroll area fills the viewport; wide content (code
* blocks) must not stretch the scroll content, otherwise `margin: auto`
* pages center inside an off-screen wider box. */
.docs-scroll-content {
min-width: 0;
}
/* -- Widgets index ---------------------------------------------------- */
.widgets-index {
max-width: 960px;
padding: 40px 48px;
}
.widgets-index-title {
font-size: 40px;
font-weight: 700;
line-height: 1.4;
}
.widgets-index-desc {
margin-top: 12px;
font-size: 16px;
@apply text-muted-foreground dark:text-muted-foreground-dark;
}
.widgets-index-heading {
margin-top: 40px;
font-size: 24px;
font-weight: 600;
line-height: 1.4;
}
.widgets-index-row {
display: flex;
flex-direction: row;
margin-top: 28px;
}
.widgets-index-cell {
flex: 1 1 0;
min-width: 0;
display: flex;
}
.widgets-index-item {
width: fit-content;
font-size: 16px;
}
/* The router outlet sits between the page body and the docs layout; give it
* the body's height so the docs ScrollArea can size itself and scroll. */
.app-body router-view {
height: 100%;
}