|
1 | 1 | @import "tailwindcss"; |
2 | 2 | @import "tw-animate-css"; |
3 | | - |
| 3 | +@import 'shadcn-prose'; |
4 | 4 | @import "./themes.css"; |
5 | 5 |
|
6 | | -@custom-variant dark (&:is(.dark *)); |
| 6 | +@plugin 'tailwind-scrollbar-hide'; |
7 | 7 |
|
| 8 | +@custom-variant dark (&:is(.dark *)); |
8 | 9 | @custom-variant fixed (&:is(.layout-fixed *)); |
9 | 10 |
|
10 | 11 | @theme inline { |
11 | | - --breakpoint-3xl: 1600px; |
12 | | - --breakpoint-4xl: 2000px; |
13 | | - --font-sans: var(--font-sans); |
14 | | - --font-mono: var(--font-mono); |
15 | 12 | --radius-sm: calc(var(--radius) - 4px); |
16 | 13 | --radius-md: calc(var(--radius) - 2px); |
17 | 14 | --radius-lg: var(--radius); |
|
39 | 36 | --color-chart-3: var(--chart-3); |
40 | 37 | --color-chart-4: var(--chart-4); |
41 | 38 | --color-chart-5: var(--chart-5); |
| 39 | + |
| 40 | + --breakpoint-3xl: 1600px; |
| 41 | + --breakpoint-4xl: 2000px; |
42 | 42 | --color-sidebar: var(--sidebar); |
43 | 43 | --color-sidebar-foreground: var(--sidebar-foreground); |
44 | 44 | --color-sidebar-primary: var(--sidebar-primary); |
|
49 | 49 | --color-sidebar-ring: var(--sidebar-ring); |
50 | 50 | --color-surface: var(--surface); |
51 | 51 | --color-surface-foreground: var(--surface-foreground); |
52 | | - --color-code: var(--code); |
53 | | - --color-code-foreground: var(--code-foreground); |
| 52 | + --color-code: var(--surface); |
| 53 | + --color-code-foreground: var(--surface-foreground); |
54 | 54 | --color-code-highlight: var(--code-highlight); |
55 | 55 | --color-code-number: var(--code-number); |
56 | 56 | --color-selection: var(--selection); |
57 | 57 | --color-selection-foreground: var(--selection-foreground); |
| 58 | + |
| 59 | + --color-brand: var(--brand); |
| 60 | + --color-highlight: var(--highlight); |
| 61 | + |
| 62 | + --font-heading: 'var(--font-heading)', 'ui-sans-serif', '-apple-system', |
| 63 | + 'BlinkMacSystemFont', 'Segoe UI Variable Display', 'Segoe UI', 'Helvetica', |
| 64 | + 'Apple Color Emoji', 'Arial', 'sans-serif', 'Segoe UI Emoji', |
| 65 | + 'Segoe UI Symbol', 'Noto Color Emoji'; |
| 66 | + --font-mono: 'var(--font-mono)', ui-monospace, SFMono-Regular, Menlo, Monaco, |
| 67 | + Consolas, 'Liberation Mono', 'Courier New', monospace; |
| 68 | + --font-sans: 'var(--font-sans)', 'ui-sans-serif', '-apple-system', |
| 69 | + 'BlinkMacSystemFont', 'Segoe UI Variable Display', 'Segoe UI', 'Helvetica', |
| 70 | + 'Apple Color Emoji', 'Arial', 'sans-serif', 'Segoe UI Emoji', |
| 71 | + 'Segoe UI Symbol', 'Noto Color Emoji'; |
58 | 72 | } |
59 | 73 |
|
60 | 74 | :root { |
|
98 | 112 | --code-number: oklch(0.56 0 0); |
99 | 113 | --selection: oklch(0.145 0 0); |
100 | 114 | --selection-foreground: oklch(1 0 0); |
| 115 | + |
| 116 | + /* Blue color scale */ |
| 117 | + --color-blue-300: oklch(0.778 0.108 231.731); |
| 118 | + --color-blue-500: oklch(0.623 0.214 259.815); |
| 119 | + --color-blue-600: oklch(0.549 0.234 260.011); |
| 120 | + --color-blue-700: oklch(0.488 0.243 264.376); |
| 121 | + --color-blue-800: oklch(0.419 0.243 267.218); |
| 122 | + |
| 123 | + --brand: oklch(0.623 0.214 259.815); /* Blue 500 */ |
| 124 | + --highlight: oklch(0.852 0.199 91.936); /* Yellow 400 */ |
101 | 125 | } |
102 | 126 |
|
103 | 127 | .dark { |
|
140 | 164 | --code-number: oklch(0.72 0 0); |
141 | 165 | --selection: oklch(0.922 0 0); |
142 | 166 | --selection-foreground: oklch(0.205 0 0); |
| 167 | + |
| 168 | + --brand: oklch(0.707 0.165 254.624); /* Blue 400 */ |
| 169 | + --highlight: oklch(0.852 0.199 91.936); /* Yellow 400 */ |
143 | 170 | } |
144 | 171 |
|
145 | 172 | @layer base { |
146 | 173 | * { |
147 | 174 | @apply border-border outline-ring/50; |
148 | 175 | } |
149 | | - ::selection { |
| 176 | + /* ::selection { |
150 | 177 | @apply bg-selection text-selection-foreground; |
151 | | - } |
152 | | - html { |
| 178 | + } */ |
| 179 | + /* html { |
153 | 180 | @apply scroll-smooth; |
154 | | - } |
| 181 | + } */ |
155 | 182 | body { |
| 183 | + @apply overscroll-none bg-background text-foreground; |
| 184 | + /* font-feature-settings: "rlig" 1, "calt" 1; */ |
156 | 185 | font-synthesis-weight: none; |
157 | 186 | text-rendering: optimizeLegibility; |
158 | 187 | } |
|
167 | 196 | button:active { |
168 | 197 | @apply opacity-60 md:opacity-100; |
169 | 198 | } |
| 199 | + |
| 200 | + /* Custom scrollbar styling (remove after sync). */ |
| 201 | + ::-webkit-scrollbar { |
| 202 | + width: 5px; |
| 203 | + } |
| 204 | + ::-webkit-scrollbar-track { |
| 205 | + background: transparent; |
| 206 | + } |
| 207 | + ::-webkit-scrollbar-thumb { |
| 208 | + background: hsl(var(--border)); |
| 209 | + border-radius: 5px; |
| 210 | + } |
| 211 | + * { |
| 212 | + scrollbar-width: thin; |
| 213 | + scrollbar-color: hsl(var(--border)) transparent; |
| 214 | + } |
| 215 | + |
| 216 | + /* Custom prose styling (remove after sync). */ |
| 217 | + .prose { |
| 218 | + --tw-prose-body: var(--foreground); |
| 219 | + --tw-prose-bold: inherit; |
| 220 | + --tw-prose-links: inherit; |
| 221 | + --tw-prose-bullets: var(--foreground); |
| 222 | + } |
170 | 223 | } |
171 | 224 |
|
172 | 225 | @utility border-grid { |
|
182 | 235 | } |
183 | 236 |
|
184 | 237 | @utility container-wrapper { |
185 | | - @apply 3xl:fixed:max-w-[calc(var(--breakpoint-2xl)+2rem)] mx-auto w-full px-2; |
| 238 | + /* @apply 3xl:fixed:max-w-[calc(var(--breakpoint-2xl)+2rem)] mx-auto w-full px-2; */ |
| 239 | + |
| 240 | + @apply px-2 mx-auto w-full max-w-[calc(var(--breakpoint-xl)+2rem)]; |
186 | 241 | } |
187 | 242 |
|
188 | 243 | @utility container { |
189 | | - @apply 3xl:max-w-screen-2xl mx-auto max-w-[1400px] px-4 lg:px-8; |
| 244 | + /* @apply 3xl:max-w-screen-2xl mx-auto max-w-[1400px] px-4 lg:px-8; */ |
| 245 | + |
| 246 | + @apply mx-auto max-w-[calc(var(--breakpoint-xl)+2rem)] px-4 xl:px-6; |
190 | 247 | } |
191 | 248 |
|
192 | 249 | @utility no-scrollbar { |
|
248 | 305 | font-size: var(--text-sm); |
249 | 306 | outline: none; |
250 | 307 | position: relative; |
251 | | - @apply md:-mx-1; |
| 308 | + @apply md:-mx-4; |
252 | 309 |
|
253 | 310 | &:has([data-rehype-pretty-code-title]) [data-slot="copy-button"] { |
254 | 311 | top: calc(var(--spacing) * 1.5) !important; |
255 | 312 | } |
256 | 313 | } |
257 | 314 |
|
258 | 315 | [data-rehype-pretty-code-title] { |
259 | | - border-bottom: 1px solid color-mix(in oklab, var(--border) 30%, transparent); |
| 316 | + border-bottom: color-mix(in oklab, var(--border) 30%, transparent); |
| 317 | + border-bottom-width: 1px; |
| 318 | + border-bottom-style: solid; |
260 | 319 | padding-block: calc(var(--spacing) * 2.5); |
261 | 320 | padding-inline: calc(var(--spacing) * 4); |
262 | 321 | font-size: var(--text-sm); |
|
339 | 398 | font-size: 0.8rem; |
340 | 399 | } |
341 | 400 | } |
| 401 | + |
| 402 | +/* MDX (remove after sync). */ |
| 403 | + |
| 404 | +@layer base { |
| 405 | + [data-theme='light'] { |
| 406 | + display: block; |
| 407 | + } |
| 408 | + |
| 409 | + [data-theme='dark'] { |
| 410 | + display: none; |
| 411 | + } |
| 412 | + |
| 413 | + .dark [data-theme='light'] { |
| 414 | + display: none; |
| 415 | + } |
| 416 | + |
| 417 | + .dark [data-theme='dark'] { |
| 418 | + display: block; |
| 419 | + } |
| 420 | + |
| 421 | + [data-rehype-pretty-code-fragment] { |
| 422 | + @apply relative text-white; |
| 423 | + } |
| 424 | + |
| 425 | + [data-rehype-pretty-code-fragment] code { |
| 426 | + @apply grid min-w-full rounded-none border-0 bg-transparent p-0 break-words; |
| 427 | + counter-reset: line; |
| 428 | + box-decoration-break: clone; |
| 429 | + } |
| 430 | + |
| 431 | + [data-rehype-pretty-code-fragment] .line { |
| 432 | + @apply inline-block min-h-[1rem] w-full px-4 py-0.5; |
| 433 | + } |
| 434 | + |
| 435 | + [data-rehype-pretty-code-fragment] [data-line-numbers] .line { |
| 436 | + @apply px-2; |
| 437 | + } |
| 438 | + |
| 439 | + [data-rehype-pretty-code-fragment] [data-line-numbers] > .line::before { |
| 440 | + @apply text-xs text-zinc-50/40; |
| 441 | + counter-increment: line; |
| 442 | + content: counter(line); |
| 443 | + display: inline-block; |
| 444 | + width: 1.8rem; |
| 445 | + margin-right: 1.4rem; |
| 446 | + text-align: right; |
| 447 | + } |
| 448 | + |
| 449 | + [data-rehype-pretty-code-fragment] .line--highlighted { |
| 450 | + @apply bg-zinc-700/50; |
| 451 | + } |
| 452 | + |
| 453 | + [data-rehype-pretty-code-fragment] .line-highlighted span { |
| 454 | + @apply relative; |
| 455 | + } |
| 456 | + |
| 457 | + [data-rehype-pretty-code-fragment] .word--highlighted { |
| 458 | + @apply rounded-md border-zinc-700/70 bg-zinc-700/50 p-1; |
| 459 | + } |
| 460 | + |
| 461 | + .dark [data-rehype-pretty-code-fragment] .word--highlighted { |
| 462 | + @apply bg-zinc-900; |
| 463 | + } |
| 464 | + |
| 465 | + [data-rehype-pretty-code-title] { |
| 466 | + @apply mt-2 px-4 pt-6 text-sm font-medium text-foreground; |
| 467 | + } |
| 468 | + |
| 469 | + [data-rehype-pretty-code-title] + pre { |
| 470 | + @apply !mt-2; |
| 471 | + } |
| 472 | +} |
0 commit comments