main
css 294 lines 5.5 KB
Raw
1 @import "tailwindcss";
2 @config "../tailwind.config.js";
3
4 @custom-variant dark (&:where(.theme-dark, .theme-dark *));
5
6 @theme inline {
7 --font-*: initial;
8 --font-sans: var(--font-family), sans-serif;
9 --font-serif: var(--font-family-display), serif;
10 --font-display: var(--font-family-display), serif;
11 --font-mono: var(--font-family-mono), monospace;
12
13 --color-primary: var(--primary-color);
14 --color-success: var(--success-color);
15 --color-error: var(--error-color);
16 --color-warning: var(--warning-color);
17 --color-info: var(--info-color);
18 --color-border: var(--border-color);
19 --color-hover: var(--hover-color);
20 --color-hover-005: var(--hover-005-color);
21
22 --color-extra-1: var(--extra1-color);
23 --color-extra-2: var(--extra2-color);
24 --color-extra-3: var(--extra3-color);
25 --color-extra-4: var(--extra4-color);
26
27 --border-color-default: var(--border-color);
28
29 --background-color-default: var(--bg-default-color);
30 --background-color-secondary: var(--bg-secondary-color);
31 --background-color-body: var(--bg-body-color);
32 --background-color-sidebar: var(--bg-sidebar-color);
33
34 --text-color-default: var(--fg-default-color);
35 --text-color-secondary: var(--fg-secondary-color);
36 --text-color-tertiary: var(--fg-tertiary-color);
37
38 --breakpoint-xs: 460px;
39 --breakpoint-mobile: 701px;
40
41 --animate-fade: fade 0.3s forwards;
42
43 @keyframes fade {
44 from {
45 opacity: 0;
46 }
47 to {
48 opacity: 1;
49 }
50 }
51
52 --animate-fade-up: fade-up 0.3s forwards;
53
54 @keyframes fade-up {
55 from {
56 opacity: 0;
57 transform: translateY(50%);
58 }
59 to {
60 opacity: 1;
61 transform: translateY(0);
62 }
63 }
64 }
65
66 @layer base {
67 /*
68 The default border color has changed to `currentColor` in Tailwind CSS v4,
69 so we've added these compatibility styles to make sure everything still
70 looks the same as it did with Tailwind CSS v3.
71
72 If we ever want to remove these styles, we need to add an explicit border
73 color utility to any element that depends on these defaults.
74 */
75 *,
76 ::after,
77 ::before,
78 ::backdrop,
79 ::file-selector-button {
80 border-color: var(--color-gray-200, currentColor);
81 }
82
83 html,
84 body {
85 text-size-adjust: 100%;
86 -webkit-tap-highlight-color: transparent;
87 -webkit-touch-callout: none;
88 -webkit-font-smoothing: antialiased;
89 -moz-osx-font-smoothing: grayscale;
90 text-rendering: optimizeLegibility;
91 line-height: var(--line-height);
92 font-size: var(--font-size);
93 text-wrap: pretty;
94
95 margin: 0;
96 padding: 0;
97 box-sizing: border-box;
98
99 width: 100vw;
100 height: 100vh;
101 height: 100svh;
102 overflow: hidden;
103
104 &:focus {
105 outline: none;
106 }
107 }
108
109 [v-cloak] {
110 display: none !important;
111 }
112
113 ::view-transition-old(root),
114 ::view-transition-new(root) {
115 animation: none;
116 mix-blend-mode: normal;
117 }
118 ::view-transition-old(root) {
119 z-index: 1;
120 }
121 ::view-transition-new(root) {
122 z-index: 99999;
123 }
124
125 ::selection {
126 background-color: rgba(var(--primary-color-rgb) / 0.2);
127 }
128
129 #app {
130 width: 100vw;
131 height: 100vh;
132 height: 100svh;
133 overflow: auto;
134 }
135
136 svg {
137 touch-action: initial !important;
138 }
139
140 input {
141 accent-color: var(--primary-color);
142 }
143
144 p {
145 color: var(--fg-secondary-color);
146 }
147
148 code,
149 kbd,
150 samp,
151 pre {
152 font-family: var(--font-family-mono);
153 }
154
155 code {
156 padding: 1px 6px;
157 border-radius: var(--border-radius-small);
158 background-color: rgba(var(--hover-color-rgb) / 0.4);
159 font-size: 13px;
160 }
161 pre {
162 border-radius: var(--border-radius-small);
163
164 code {
165 padding: 12px;
166 display: block;
167 overflow-x: auto;
168 }
169 }
170
171 a {
172 text-decoration: underline;
173 text-decoration-color: var(--primary-color);
174 color: var(--primary-color);
175 }
176
177 blockquote {
178 display: block;
179 padding-left: 1em;
180 border-left: 4px solid var(--border-color);
181 }
182
183 dl {
184 dt {
185 font-weight: bold;
186 margin-bottom: 2px;
187 }
188
189 & > dd:not(:last-child) {
190 margin-bottom: 10px;
191 }
192 }
193
194 ul {
195 display: block;
196 list-style-type: disc;
197 padding-left: 20px;
198 line-height: 1.6;
199
200 ul {
201 list-style-type: circle;
202 margin-top: 3px;
203 margin-bottom: 6px;
204 }
205 }
206
207 ol {
208 display: block;
209 list-style-type: decimal;
210 padding-left: 20px;
211 line-height: 1.6;
212
213 ol {
214 list-style-type: decimal;
215 margin-top: 3px;
216 margin-bottom: 6px;
217 }
218 }
219
220 mark {
221 padding: 2px 0px;
222 border-radius: var(--border-radius-small);
223 background-color: rgba(var(--primary-color-rgb) / 0.3);
224 color: var(--fg-default-color);
225 }
226
227 @media print {
228 html,
229 body {
230 overflow: initial;
231 }
232 body {
233 #app {
234 height: initial;
235 background-color: white;
236
237 & > .n-config-provider {
238 & > .layout {
239 display: block;
240 height: initial;
241 background-color: white;
242
243 & > .header-bar {
244 display: none;
245 }
246 & > .main {
247 background-color: white;
248 overflow: initial;
249 height: initial;
250
251 header.toolbar {
252 display: none;
253 }
254 footer.footer {
255 display: none;
256 }
257
258 & > .n-scrollbar {
259 overflow: initial;
260 height: initial;
261
262 & > .n-scrollbar-container {
263 overflow: initial;
264 height: initial;
265 }
266 }
267 }
268 }
269 }
270 }
271 }
272 }
273
274 html.theme-dark .shiki,
275 html.theme-dark .shiki span {
276 color: var(--shiki-dark) !important;
277 /*background-color: var(--shiki-dark-bg) !important;*/
278 /* Optional, if you also want font styles */
279 font-style: var(--shiki-dark-font-style) !important;
280 font-weight: var(--shiki-dark-font-weight) !important;
281 text-decoration: var(--shiki-dark-text-decoration) !important;
282 }
283 html.theme-dark,
284 html.theme-light {
285 .shiki {
286 overflow: hidden;
287 background-color: transparent !important;
288
289 span {
290 background-color: transparent !important;
291 }
292 }
293 }
294 }