|
1 | 1 | @layer base, starlight, theme, components, utilities; |
2 | 2 |
|
3 | | -@import '@astrojs/starlight-tailwind'; |
4 | | -@import 'tailwindcss/theme.css' layer(theme); |
5 | | -@import 'tailwindcss/utilities.css' layer(utilities); |
| 3 | +@import "@astrojs/starlight-tailwind"; |
| 4 | +@import "tailwindcss/theme.css" layer(theme); |
| 5 | +@import "tailwindcss/utilities.css" layer(utilities); |
| 6 | + |
| 7 | +/* Dark mode colors - Feathers theme ported from DaisyUI */ |
| 8 | +:root { |
| 9 | + /* Accent colors derived from primary: oklch(48% 39% 348) */ |
| 10 | + --sl-color-accent-low: oklch(20% 20% 348); |
| 11 | + --sl-color-accent: oklch(48% 39% 348); |
| 12 | + --sl-color-text-accent: oklch(48% 39% 348); |
| 13 | + --sl-color-accent-high: oklch(75% 30% 348); |
| 14 | + |
| 15 | + /* Base colors from DaisyUI theme */ |
| 16 | + --sl-color-white: oklch(93.3% 0.01 260); /* base-content */ |
| 17 | + --sl-color-gray-1: oklch(80% 0.05 270); /* lighter gray */ |
| 18 | + --sl-color-gray-2: oklch(65% 0.1 280); /* light gray */ |
| 19 | + --sl-color-gray-3: oklch(50% 25% 285); /* medium gray */ |
| 20 | + --sl-color-gray-4: oklch(35% 44% 287); /* base-300 */ |
| 21 | + --sl-color-gray-5: oklch(25% 32% 295); /* between base-300 and base-200 */ |
| 22 | + --sl-color-gray-6: oklch(15% 19% 307); /* base-200 */ |
| 23 | + --sl-color-black: oklch(3.6% 0.01 270); /* base-100 */ |
| 24 | +} |
| 25 | + |
| 26 | +/* Light mode colors - inverted for light theme */ |
| 27 | +:root[data-theme="light"] { |
| 28 | + /* Accent colors adjusted for light mode */ |
| 29 | + --sl-color-accent-low: oklch(85% 20% 348); |
| 30 | + --sl-color-accent: oklch(50% 39% 348); |
| 31 | + --sl-color-text-accent: oklch(48% 39% 348); |
| 32 | + --sl-color-accent-high: oklch(25% 30% 348); |
| 33 | + |
| 34 | + /* Inverted base colors */ |
| 35 | + --sl-color-white: oklch(3.6% 0.01 270); /* base-100 inverted */ |
| 36 | + --sl-color-gray-1: oklch(15% 19% 307); /* base-200 inverted */ |
| 37 | + --sl-color-gray-2: oklch(25% 32% 295); |
| 38 | + --sl-color-gray-3: oklch(35% 44% 287); /* base-300 inverted */ |
| 39 | + --sl-color-gray-4: oklch(50% 25% 285); |
| 40 | + --sl-color-gray-5: oklch(65% 0.1 280); |
| 41 | + --sl-color-gray-6: oklch(80% 0.05 270); |
| 42 | + --sl-color-gray-7: oklch(90% 0.02 265); |
| 43 | + --sl-color-black: oklch(93.3% 0.01 260); /* base-content inverted */ |
| 44 | +} |
6 | 45 |
|
7 | 46 | @theme { |
8 | | - /* |
9 | | - Configure your Tailwind theme that will be used by Starlight. |
10 | | - https://starlight.astro.build/guides/css-and-tailwind/#styling-starlight-with-tailwind |
11 | | - */ |
| 47 | + /* Tailwind v4 theme configuration */ |
| 48 | + |
| 49 | + /* Font Family */ |
| 50 | + --font-family-sans: Poppins, ui-sans-serif, system-ui, sans-serif; |
| 51 | + |
| 52 | + /* Custom DaisyUI-compatible colors for Tailwind classes */ |
| 53 | + --color-base-100: oklch(3.6% 0.01 270); |
| 54 | + --color-base-200: oklch(15% 19% 307); |
| 55 | + --color-base-300: oklch(35% 44% 287); |
| 56 | + --color-base-content: oklch(93.3% 0.01 260); |
| 57 | + |
| 58 | + --color-primary: oklch(48% 39% 348); |
| 59 | + --color-primary-content: oklch(100% 0 0); |
| 60 | + --color-secondary: oklch(60% 44% 272); |
| 61 | + --color-secondary-content: oklch(0% 0 0); |
| 62 | + --color-accent: oklch(34.1% 0.13 297.4); |
| 63 | + --color-accent-content: oklch(100% 0 0); |
| 64 | + --color-neutral: oklch(20.1% 0.05 260.7); |
| 65 | + --color-neutral-content: oklch(100% 0 0); |
| 66 | + |
| 67 | + --color-info: oklch(56.8% 0.14 255.1); |
| 68 | + --color-success: oklch(77.1% 0.13 149.9); |
| 69 | + --color-warning: oklch(89.5% 0.17 97.7); |
| 70 | + --color-error: oklch(64.1% 0.21 29.3); |
| 71 | + |
| 72 | + /* Border Radius */ |
| 73 | + --radius-sm: 0.5rem; |
| 74 | + --radius-md: 1rem; |
| 75 | + --radius-lg: 1rem; |
| 76 | + --radius-xl: 1rem; |
| 77 | + --radius-2xl: 1rem; |
| 78 | + --radius-3xl: 1rem; |
| 79 | + --radius-4xl: 2rem; |
| 80 | +} |
| 81 | + |
| 82 | +@layer base { |
| 83 | + @media (min-width: 640px) { |
| 84 | + html { |
| 85 | + font-size: 18px; |
| 86 | + } |
| 87 | + } |
| 88 | + |
| 89 | + html { |
| 90 | + background-color: var(--sl-color-black); |
| 91 | + font-family: var(--font-family-sans); |
| 92 | + } |
| 93 | + |
| 94 | + html, |
| 95 | + body { |
| 96 | + height: 100%; |
| 97 | + width: 100%; |
| 98 | + } |
| 99 | + |
| 100 | + /* Remove text decoration from heading links in prose */ |
| 101 | + .prose h1 a, |
| 102 | + .prose h2 a, |
| 103 | + .prose h3 a, |
| 104 | + .prose h4 a, |
| 105 | + .prose h5 a, |
| 106 | + .prose h6 a { |
| 107 | + text-decoration: none !important; |
| 108 | + } |
12 | 109 | } |
13 | 110 |
|
14 | 111 | /* |
|
0 commit comments