|
4 | 4 | * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 |
5 | 5 | */ |
6 | 6 |
|
| 7 | +@import "tailwindcss"; |
| 8 | +@import "./animations.css"; |
| 9 | + |
| 10 | +/* Scan Rust source files for utility classes */ |
| 11 | +@source "../src/**/*.rs"; |
| 12 | + |
| 13 | +/* Class-based dark mode (toggle via .dark on <html>) */ |
| 14 | +@custom-variant dark (&:where(.dark, .dark *)); |
| 15 | + |
| 16 | +@theme { |
| 17 | + /* Bee-themed color tokens */ |
| 18 | + --color-honey: var(--honey); |
| 19 | + --color-honey-light: var(--honey-light); |
| 20 | + --color-honey-dark: var(--honey-dark); |
| 21 | + --color-nectar: var(--nectar); |
| 22 | + --color-comb: var(--comb); |
| 23 | + --color-bark: var(--bark); |
| 24 | + --color-pollen: var(--pollen); |
| 25 | + --color-surface: var(--surface); |
| 26 | + --color-surface-raised: var(--surface-raised); |
| 27 | + |
| 28 | + /* Typography */ |
| 29 | + --font-sans: "Inter", system-ui, sans-serif; |
| 30 | + --font-mono: "JetBrains Mono", ui-monospace, monospace; |
| 31 | + |
| 32 | + /* Max widths */ |
| 33 | + --container-prose: 75ch; |
| 34 | +} |
| 35 | + |
7 | 36 | @font-face { |
8 | 37 | font-family: "Inter"; |
9 | 38 | font-style: normal; |
|
20 | 49 | src: url("/fonts/JetBrainsMono-Regular.woff2") format("woff2"); |
21 | 50 | } |
22 | 51 |
|
23 | | -@tailwind base; |
24 | | -@tailwind components; |
25 | | -@tailwind utilities; |
26 | | - |
27 | 52 | @layer base { |
28 | 53 | :root { |
29 | 54 | --honey: #f59e0b; |
|
68 | 93 | } |
69 | 94 |
|
70 | 95 | body { |
71 | | - font-family: "Inter", system-ui, sans-serif; |
72 | | - background-color: var(--surface); |
73 | | - color: var(--bark); |
| 96 | + font-family: var(--font-sans); |
| 97 | + background-color: var(--color-surface); |
| 98 | + color: var(--color-bark); |
74 | 99 | -webkit-font-smoothing: antialiased; |
75 | 100 | -moz-osx-font-smoothing: grayscale; |
76 | 101 | } |
77 | 102 |
|
78 | 103 | code, |
79 | 104 | pre, |
80 | 105 | kbd { |
81 | | - font-family: "JetBrains Mono", ui-monospace, monospace; |
| 106 | + font-family: var(--font-mono); |
82 | 107 | } |
83 | 108 | } |
84 | 109 |
|
85 | 110 | @layer components { |
86 | 111 | .prose { |
87 | | - @apply text-bark leading-relaxed; |
| 112 | + color: var(--color-bark); |
| 113 | + line-height: 1.625; |
88 | 114 | } |
89 | 115 |
|
90 | 116 | .prose h1 { |
91 | | - @apply text-3xl font-bold mt-0 mb-6; |
| 117 | + font-size: 1.875rem; |
| 118 | + line-height: 2.25rem; |
| 119 | + font-weight: 700; |
| 120 | + margin-top: 0; |
| 121 | + margin-bottom: 1.5rem; |
92 | 122 | } |
93 | 123 |
|
94 | 124 | .prose h2 { |
95 | | - @apply text-2xl font-semibold mt-12 mb-4 pb-2 border-b border-honey/10; |
| 125 | + font-size: 1.5rem; |
| 126 | + line-height: 2rem; |
| 127 | + font-weight: 600; |
| 128 | + margin-top: 3rem; |
| 129 | + margin-bottom: 1rem; |
| 130 | + padding-bottom: 0.5rem; |
| 131 | + border-bottom: 1px solid color-mix(in oklch, var(--color-honey) 10%, transparent); |
96 | 132 | } |
97 | 133 |
|
98 | 134 | .prose h3 { |
99 | | - @apply text-xl font-semibold mt-8 mb-3; |
| 135 | + font-size: 1.25rem; |
| 136 | + line-height: 1.75rem; |
| 137 | + font-weight: 600; |
| 138 | + margin-top: 2rem; |
| 139 | + margin-bottom: 0.75rem; |
100 | 140 | } |
101 | 141 |
|
102 | 142 | .prose h4 { |
103 | | - @apply text-lg font-medium mt-6 mb-2; |
| 143 | + font-size: 1.125rem; |
| 144 | + line-height: 1.75rem; |
| 145 | + font-weight: 500; |
| 146 | + margin-top: 1.5rem; |
| 147 | + margin-bottom: 0.5rem; |
104 | 148 | } |
105 | 149 |
|
106 | 150 | .prose p { |
107 | | - @apply my-4; |
| 151 | + margin-top: 1rem; |
| 152 | + margin-bottom: 1rem; |
108 | 153 | } |
109 | 154 |
|
110 | 155 | .prose a { |
111 | | - @apply text-honey hover:underline; |
| 156 | + color: var(--color-honey); |
| 157 | + } |
| 158 | + .prose a:hover { |
| 159 | + text-decoration: underline; |
112 | 160 | } |
113 | 161 |
|
114 | 162 | .prose ul { |
115 | | - @apply my-4 pl-6 list-disc; |
| 163 | + margin-top: 1rem; |
| 164 | + margin-bottom: 1rem; |
| 165 | + padding-left: 1.5rem; |
| 166 | + list-style-type: disc; |
116 | 167 | } |
117 | 168 |
|
118 | 169 | .prose ol { |
119 | | - @apply my-4 pl-6 list-decimal; |
| 170 | + margin-top: 1rem; |
| 171 | + margin-bottom: 1rem; |
| 172 | + padding-left: 1.5rem; |
| 173 | + list-style-type: decimal; |
120 | 174 | } |
121 | 175 |
|
122 | 176 | .prose li { |
123 | | - @apply my-1; |
| 177 | + margin-top: 0.25rem; |
| 178 | + margin-bottom: 0.25rem; |
124 | 179 | } |
125 | 180 |
|
126 | 181 | .prose code:not(pre code) { |
127 | | - @apply rounded bg-pollen px-1.5 py-0.5 text-sm font-mono; |
| 182 | + border-radius: 0.25rem; |
| 183 | + background-color: var(--color-pollen); |
| 184 | + padding-left: 0.375rem; |
| 185 | + padding-right: 0.375rem; |
| 186 | + padding-top: 0.125rem; |
| 187 | + padding-bottom: 0.125rem; |
| 188 | + font-size: 0.875rem; |
| 189 | + font-family: var(--font-mono); |
128 | 190 | } |
129 | 191 |
|
130 | 192 | .prose pre { |
131 | | - @apply my-6 rounded-lg bg-pollen p-4 overflow-x-auto; |
| 193 | + margin-top: 1.5rem; |
| 194 | + margin-bottom: 1.5rem; |
| 195 | + border-radius: 0.5rem; |
| 196 | + background-color: var(--color-pollen); |
| 197 | + padding: 1rem; |
| 198 | + overflow-x: auto; |
132 | 199 | } |
133 | 200 |
|
134 | 201 | .prose blockquote { |
135 | | - @apply my-4 border-l-4 border-honey/30 pl-4 italic text-comb; |
| 202 | + margin-top: 1rem; |
| 203 | + margin-bottom: 1rem; |
| 204 | + border-left: 4px solid color-mix(in oklch, var(--color-honey) 30%, transparent); |
| 205 | + padding-left: 1rem; |
| 206 | + font-style: italic; |
| 207 | + color: var(--color-comb); |
136 | 208 | } |
137 | 209 |
|
138 | 210 | .prose table { |
139 | | - @apply my-6 w-full border-collapse; |
| 211 | + margin-top: 1.5rem; |
| 212 | + margin-bottom: 1.5rem; |
| 213 | + width: 100%; |
| 214 | + border-collapse: collapse; |
140 | 215 | } |
141 | 216 |
|
142 | 217 | .prose th { |
143 | | - @apply border-b border-honey/20 px-4 py-2 text-left font-semibold; |
| 218 | + border-bottom: 1px solid color-mix(in oklch, var(--color-honey) 20%, transparent); |
| 219 | + padding: 0.5rem 1rem; |
| 220 | + text-align: left; |
| 221 | + font-weight: 600; |
144 | 222 | } |
145 | 223 |
|
146 | 224 | .prose td { |
147 | | - @apply border-b border-honey/5 px-4 py-2; |
| 225 | + border-bottom: 1px solid color-mix(in oklch, var(--color-honey) 5%, transparent); |
| 226 | + padding: 0.5rem 1rem; |
148 | 227 | } |
149 | 228 |
|
150 | 229 | .prose hr { |
151 | | - @apply my-8 border-honey/10; |
| 230 | + margin-top: 2rem; |
| 231 | + margin-bottom: 2rem; |
| 232 | + border-color: color-mix(in oklch, var(--color-honey) 10%, transparent); |
152 | 233 | } |
153 | 234 |
|
154 | 235 | .prose strong { |
155 | | - @apply font-semibold; |
| 236 | + font-weight: 600; |
156 | 237 | } |
157 | 238 |
|
158 | 239 | .prose img { |
159 | | - @apply my-6 rounded-lg; |
| 240 | + margin-top: 1.5rem; |
| 241 | + margin-bottom: 1.5rem; |
| 242 | + border-radius: 0.5rem; |
160 | 243 | } |
161 | 244 | } |
162 | | - |
163 | | -@import "./animations.css"; |
|
0 commit comments