@import 'tailwindcss'; @import 'tw-animate-css'; @import 'shadcn-prose'; @import '../registry/styles/preview-style-classes.css'; @source "../**/*.{ts,tsx,mdx}"; @source not "../../public/r"; @source not "../__registry__"; @source not "../**/__tests__"; @source not "../../tests"; @source not "../**/*.{spec,test}.{ts,tsx}"; @plugin "tailwind-scrollbar-hide"; @custom-variant dark (&:is(.dark *)); @custom-variant fixed (&:is(.layout-fixed *)); @theme inline { --radius-sm: calc(var(--radius) - 4px); --radius-md: calc(var(--radius) - 2px); --radius-lg: var(--radius); --radius-xl: calc(var(--radius) + 4px); --color-background: var(--background); --color-foreground: var(--foreground); --color-card: var(--card); --color-card-foreground: var(--card-foreground); --color-popover: var(--popover); --color-popover-foreground: var(--popover-foreground); --color-primary: var(--primary); --color-primary-foreground: var(--primary-foreground); --color-secondary: var(--secondary); --color-secondary-foreground: var(--secondary-foreground); --color-muted: var(--muted); --color-muted-foreground: var(--muted-foreground); --color-accent: var(--accent); --color-accent-foreground: var(--accent-foreground); --color-destructive: var(--destructive); --color-border: var(--border); --color-input: var(--input); --color-ring: var(--ring); --color-chart-1: var(--chart-1); --color-chart-2: var(--chart-2); --color-chart-3: var(--chart-3); --color-chart-4: var(--chart-4); --color-chart-5: var(--chart-5); --breakpoint-3xl: 1600px; --breakpoint-4xl: 2000px; --color-sidebar: var(--sidebar); --color-sidebar-foreground: var(--sidebar-foreground); --color-sidebar-primary: var(--sidebar-primary); --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); --color-sidebar-accent: var(--sidebar-accent); --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); --color-sidebar-border: var(--sidebar-border); --color-sidebar-ring: var(--sidebar-ring); --color-surface: var(--surface); --color-surface-foreground: var(--surface-foreground); --color-code: var(--surface); --color-code-foreground: var(--surface-foreground); --color-code-highlight: var(--code-highlight); --color-code-number: var(--code-number); --color-selection: var(--selection); --color-selection-foreground: var(--selection-foreground); --color-brand: var(--brand); --color-highlight: var(--highlight); --font-heading: var(--font-heading), 'ui-sans-serif', '-apple-system', 'BlinkMacSystemFont', 'Segoe UI Variable Display', 'Segoe UI', 'Helvetica', 'Apple Color Emoji', 'Arial', 'sans-serif', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; --font-mono: var(--font-mono), ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace; --font-sans: var(--font-sans), 'ui-sans-serif', '-apple-system', 'BlinkMacSystemFont', 'Segoe UI Variable Display', 'Segoe UI', 'Helvetica', 'Apple Color Emoji', 'Arial', 'sans-serif', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; } :root { --radius: 0.625rem; --background: oklch(1 0 0); --foreground: oklch(0.145 0 0); --card: oklch(1 0 0); --card-foreground: oklch(0.145 0 0); --popover: oklch(1 0 0); --popover-foreground: oklch(0.145 0 0); --primary: oklch(0.205 0 0); --primary-foreground: oklch(0.985 0 0); --secondary: oklch(0.97 0 0); --secondary-foreground: oklch(0.205 0 0); --muted: oklch(0.97 0 0); --muted-foreground: oklch(0.556 0 0); --accent: oklch(0.97 0 0); --accent-foreground: oklch(0.205 0 0); --destructive: oklch(0.577 0.245 27.325); --border: oklch(0.922 0 0); --input: oklch(0.922 0 0); --ring: oklch(0.708 0 0); --chart-1: var(--color-blue-300); --chart-2: var(--color-blue-500); --chart-3: var(--color-blue-600); --chart-4: var(--color-blue-700); --chart-5: var(--color-blue-800); --sidebar: oklch(0.985 0 0); --sidebar-foreground: oklch(0.145 0 0); --sidebar-primary: oklch(0.205 0 0); --sidebar-primary-foreground: oklch(0.985 0 0); --sidebar-accent: oklch(0.97 0 0); --sidebar-accent-foreground: oklch(0.205 0 0); --sidebar-border: oklch(0.922 0 0); --sidebar-ring: oklch(0.708 0 0); --surface: oklch(0.98 0 0); --surface-foreground: var(--foreground); --code: var(--surface); --code-foreground: var(--surface-foreground); --code-highlight: oklch(0.96 0 0); --code-number: oklch(0.56 0 0); --selection: oklch(0.145 0 0); --selection-foreground: oklch(1 0 0); /* Blue color scale */ --color-blue-300: oklch(0.778 0.108 231.731); --color-blue-500: oklch(0.623 0.214 259.815); --color-blue-600: oklch(0.549 0.234 260.011); --color-blue-700: oklch(0.488 0.243 264.376); --color-blue-800: oklch(0.419 0.243 267.218); --brand: oklch(0.623 0.214 259.815); /* Blue 500 */ --highlight: oklch(0.852 0.199 91.936); /* Yellow 400 */ --syntax-keyword: #d13344; --syntax-constant: #005cc5; --syntax-built-in: #bc4f01; --syntax-bullet: #735c0f; --syntax-comment: #68717b; --syntax-tag: #1b8136; --syntax-string: #032f62; --syntax-section: #005cc5; --syntax-title: #6f42c1; --syntax-addition: #1b8136; --syntax-addition-background: #f0fff4; --syntax-deletion: #b31d28; --syntax-deletion-background: #ffeef0; } .dark { --background: oklch(0.145 0 0); --foreground: oklch(0.985 0 0); --card: oklch(0.205 0 0); --card-foreground: oklch(0.985 0 0); --popover: oklch(0.205 0 0); --popover-foreground: oklch(0.985 0 0); --primary: oklch(0.922 0 0); --primary-foreground: oklch(0.205 0 0); --secondary: oklch(0.269 0 0); --secondary-foreground: oklch(0.985 0 0); --muted: oklch(0.269 0 0); --muted-foreground: oklch(0.708 0 0); --accent: oklch(0.371 0 0); --accent-foreground: oklch(0.985 0 0); --destructive: oklch(0.704 0.191 22.216); --border: oklch(1 0 0 / 10%); --input: oklch(1 0 0 / 15%); --ring: oklch(0.556 0 0); --chart-1: var(--color-blue-300); --chart-2: var(--color-blue-500); --chart-3: var(--color-blue-600); --chart-4: var(--color-blue-700); --chart-5: var(--color-blue-800); --sidebar: oklch(0.205 0 0); --sidebar-foreground: oklch(0.985 0 0); --sidebar-primary: oklch(0.488 0.243 264.376); --sidebar-primary-foreground: oklch(0.985 0 0); --sidebar-accent: oklch(0.269 0 0); --sidebar-accent-foreground: oklch(0.985 0 0); --sidebar-border: oklch(1 0 0 / 10%); --sidebar-ring: oklch(0.439 0 0); --surface: oklch(0.2 0 0); --surface-foreground: oklch(0.708 0 0); --code: var(--surface); --code-foreground: var(--surface-foreground); --code-highlight: oklch(0.27 0 0); --code-number: oklch(0.72 0 0); --selection: oklch(0.922 0 0); --selection-foreground: oklch(0.205 0 0); --brand: oklch(0.707 0.165 254.624); /* Blue 400 */ --highlight: oklch(0.852 0.199 91.936); /* Yellow 400 */ --syntax-keyword: #ee6960; --syntax-constant: #6596cf; --syntax-built-in: #c3854e; --syntax-bullet: #967e38; --syntax-comment: #78828c; --syntax-tag: #36a84f; --syntax-string: #3593ff; --syntax-section: #61a5f2; --syntax-title: #a77bfa; --syntax-addition: #ceead5; --syntax-addition-background: #3c5743; --syntax-deletion: #e7c7cb; --syntax-deletion-background: #473235; } @layer base { * { @apply border-border outline-ring/50; } /* ::selection { @apply bg-selection text-selection-foreground; } */ /* html { @apply scroll-smooth; } */ body { @apply overscroll-none bg-background text-foreground; /* font-feature-settings: "rlig" 1, "calt" 1; */ font-synthesis-weight: none; text-rendering: optimizeLegibility; } @supports (font: -apple-system-body) and (-webkit-appearance: none) { [data-wrapper] { @apply min-[1800px]:border-t; } } a:active, button:active { @apply opacity-60 md:opacity-100; } @media (prefers-reduced-motion: reduce) { *, ::before, ::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; /* Nonzero durations create visibility transitions on static descendants. */ transition-duration: 0s !important; } } } @utility border-grid { @apply border-border/50 dark:border-border; } @utility section-soft { @apply bg-gradient-to-b from-background to-surface/40 dark:bg-background 3xl:fixed:bg-none; } @utility theme-container { @apply font-sans; } @utility container-wrapper { @apply mx-auto w-full px-2 3xl:fixed:max-w-[calc(var(--breakpoint-2xl)+2rem)]; } @utility container { /* @apply 3xl:max-w-screen-2xl mx-auto max-w-[1400px] px-4 lg:px-8; */ @apply mx-auto max-w-[calc(var(--breakpoint-xl)+2rem)] px-4 xl:px-6; } @utility no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; &::-webkit-scrollbar { display: none; } } @utility border-ghost { @apply relative after:absolute after:inset-0 after:border after:border-border after:mix-blend-darken dark:after:mix-blend-lighten; } @utility step { counter-increment: step; @apply relative; &:before { @apply right-0 mr-2 hidden size-7 items-center justify-center rounded-full text-center -indent-px font-mono text-sm font-medium text-muted-foreground md:absolute; content: counter(step); } } @utility extend-touch-target { @media (pointer: coarse) { @apply relative touch-manipulation after:absolute after:-inset-2; } } @layer components { [data-rehype-pretty-code-fragment] > :not(code)[data-theme='light'] { display: block; } [data-rehype-pretty-code-fragment] > :not(code)[data-theme='dark'] { display: none; } .dark [data-rehype-pretty-code-fragment] > :not(code)[data-theme='light'] { display: none; } .dark [data-rehype-pretty-code-fragment] > :not(code)[data-theme='dark'] { display: block; } [data-rehype-pretty-code-fragment] > code[data-theme='light'] { display: inline; } [data-rehype-pretty-code-fragment] > code[data-theme='dark'] { display: none; } .dark [data-rehype-pretty-code-fragment] > code[data-theme='light'] { display: none; } .dark [data-rehype-pretty-code-fragment] > code[data-theme='dark'] { display: inline; } [data-rehype-pretty-code-fragment]:has([data-rehype-pretty-code-title]) { background-color: var(--color-code); color: var(--color-code-foreground); border-radius: var(--radius-lg); border-width: 0px; border-color: var(--border); margin-top: calc(var(--spacing) * 6); margin-bottom: calc(var(--spacing) * 4); overflow: hidden; font-size: var(--text-sm); outline: none; position: relative; } .steps { &:first-child { @apply !mt-0; } &:first-child > h3:first-child { @apply !mt-0; } > h3 { @apply !mt-16; } > h3 + p { @apply !mt-2; } } [data-rehype-pretty-code-figure] { background-color: var(--color-code); color: var(--color-code-foreground); border-radius: var(--radius-lg); border-width: 0px; border-color: var(--border); margin-top: calc(var(--spacing) * 6); overflow: hidden; font-size: var(--text-sm); outline: none; position: relative; @apply md:-mx-4; } pre[data-prompt] { padding-inline: calc(var(--spacing) * 3) calc(var(--spacing) * 10); } pre[data-prompt] code { display: block; white-space: pre-wrap; } pre[data-prompt] [data-line] { display: inline; } [data-rehype-pretty-code-title] ~ pre [data-slot='copy-button'] { top: calc(var(--spacing) * 1.5) !important; } [data-rehype-pretty-code-title] { align-items: center; gap: calc(var(--spacing) * 2); border-bottom: color-mix(in oklab, var(--border) 30%, transparent); border-bottom-width: 1px; border-bottom-style: solid; padding-block: calc(var(--spacing) * 2.5); padding-inline: calc(var(--spacing) * 4); font-size: var(--text-sm); font-family: var(--font-mono); color: var(--color-code-foreground); } [data-rehype-pretty-code-fragment] > [data-rehype-pretty-code-title][data-theme='light'] { display: flex !important; } [data-rehype-pretty-code-fragment] > [data-rehype-pretty-code-title][data-theme='dark'] { display: none !important; } .dark [data-rehype-pretty-code-fragment] > [data-rehype-pretty-code-title][data-theme='light'] { display: none !important; } .dark [data-rehype-pretty-code-fragment] > [data-rehype-pretty-code-title][data-theme='dark'] { display: flex !important; } [data-rehype-pretty-code-title][data-file-icon-label]::before { content: attr(data-file-icon-label); display: inline-flex; width: calc(var(--spacing) * 4); height: calc(var(--spacing) * 4); flex-shrink: 0; align-items: center; justify-content: center; border-radius: 1px; background-color: var(--foreground); color: var(--color-code); font-family: var(--font-sans); font-size: 0.55rem; font-weight: 700; line-height: 1; opacity: 0.7; } [data-line-numbers] { display: grid; min-width: 100%; white-space: pre; border: 0; background: transparent; padding: 0; counter-reset: line; box-decoration-break: clone; } [data-line-numbers] [data-line]::before { font-size: var(--text-sm); counter-increment: line; content: counter(line); display: inline-block; width: calc(var(--spacing) * 16); padding-right: calc(var(--spacing) * 6); text-align: right; color: var(--color-code-number); background-color: var(--color-code); position: sticky; left: 0; } [data-line-numbers] [data-highlighted-line][data-line]::before { background-color: var(--color-code-highlight); } [data-line] { padding-top: calc(var(--spacing) * 0.5); padding-bottom: calc(var(--spacing) * 0.5); min-height: calc(var(--spacing) * 1); width: 100%; display: inline-block; } [data-line] span[style*='--shiki-light'] { color: var(--shiki-light); } [data-line] span[style*='--shiki-dark'] { @variant dark { color: var(--shiki-dark) !important; } } [data-highlighted-line], [data-highlighted-chars] { position: relative; background-color: var(--color-code-highlight); } [data-highlighted-line] { &:after { position: absolute; top: 0; left: 0; width: 2px; height: 100%; content: ''; background-color: color-mix( in oklab, var(--muted-foreground) 50%, transparent ); } } [data-highlighted-chars] { border-radius: var(--radius-sm); padding-inline: 0.3rem; padding-block: 0.1rem; font-family: var(--font-mono); font-size: 0.8rem; } }