forked from arktypeio/arktype
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglobal.css
More file actions
307 lines (266 loc) · 6.91 KB
/
Copy pathglobal.css
File metadata and controls
307 lines (266 loc) · 6.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
@import "tailwindcss";
@import "fumadocs-ui/css/ocean.css";
@import "fumadocs-ui/css/preset.css";
@source '../node_modules/fumadocs-ui/dist/**/*.js';
@font-face {
font-family: "Cascadia Mono";
src:
local("Cascadia Mono"),
url("https://fonts.cdnfonts.com/s/37910/CascadiaMono.woff") format("woff");
}
@theme {
--color-background: var(--color-fd-background);
--color-foreground: var(--color-fd-foreground);
--color-muted: var(--color-fd-muted);
--color-muted-foreground: var(--color-fd-muted-foreground);
--color-popover: var(--color-fd-popover);
--color-popover-foreground: var(--color-fd-popover-foreground);
--color-card: var(--color-fd-card);
--color-card-foreground: var(--color-fd-card-foreground);
--color-border: var(--color-fd-border);
--color-primary: var(--color-fd-primary);
--color-primary-foreground: var(--color-fd-primary-foreground);
--color-secondary: var(--color-fd-secondary);
--color-secondary-foreground: var(--color-fd-secondary-foreground);
--color-accent: var(--color-fd-accent);
--color-accent-foreground: var(--color-fd-accent-foreground);
--color-ring: var(--color-fd-ring);
--color-highlight: #f5cf8f;
}
/** the * ensures this overrides the variable definitions from shiki*/
:root * {
--background: 207 100% 9%;
--hover-glow: 0.5rem 0.5rem 2rem 0 rgba(31, 38, 135, 0.37);
/* Based on ArkDark ErrorLens */
--ark-green: #40decc;
--ark-error: #9558f8;
--ark-success: #40decca0;
--ark-runtime-error: #f85858;
/** @shikijs/twoslash/style-rich.css overrides */
--twoslash-border-color: #ba7e4127;
--twoslash-underline-color: currentColor;
--twoslash-highlighted-border: #c37d0d50;
--twoslash-highlighted-bg: #c37d0d20;
--twoslash-popup-bg: transparent;
--twoslash-popup-color: inherit;
--twoslash-popup-shadow: var(--shadow);
--twoslash-docs-color: #888;
--twoslash-docs-font: sans-serif;
--twoslash-code-font: inherit;
--twoslash-code-font-size: 1em;
--twoslash-matched-color: inherit;
--twoslash-unmatched-color: #888;
--twoslash-cursor-color: #888;
--twoslash-error-color: var(--ark-error);
--twoslash-error-bg: #9558f818;
--twoslash-warn-color: #c37d0d;
--twoslash-warn-bg: #c37d0d20;
--twoslash-tag-color: #3772cf;
--twoslash-tag-bg: #3772cf20;
--twoslash-tag-warn-color: var(--twoslash-warn-color);
--twoslash-tag-warn-bg: var(--twoslash-warn-bg);
--twoslash-tag-annotate-color: #1ba673;
--twoslash-tag-annotate-bg: #1ba67320;
}
@media (prefers-reduced-motion: no-preference) {
* {
scroll-behavior: smooth;
}
}
pre,
code {
font-family: "Cascadia Mono", monospace;
}
/* hack to avoid max-height on fuma codeblocks */
@layer utilities {
.max-h-\[600px\] {
max-height: unset;
}
}
.fd-codeblock.twoslash {
border-radius: 1.5rem !important;
}
pre.shiki,
.twoslash-popup-container {
border-radius: 1rem;
border-color: #ba7e4127;
border-width: 1px;
overflow-x: visible !important;
}
/** should match arkDarkTheme.colors["editor.background"] */
.bg-fd-secondary\/50 {
background-color: #0006;
}
/** avoid border on hover:
https://github.com/arktypeio/arktype/issues/1217 */
.twoslash-popup-container pre.shiki,
figure.shiki {
background-color: unset !important;
}
div.twoslash-popup-container {
border-radius: 1rem;
background: #001323aa;
backdrop-filter: blur(8px);
box-shadow: var(--hover-glow);
}
/** .error.highlighted matches error lines explicitly added in the snippet
source via [!code error] */
.error.highlighted {
position: relative;
padding: 4px;
background-color: var(--twoslash-error-bg);
border-left: 3px solid var(--ark-error);
padding-right: 16px;
margin: 0.2em 0;
min-width: 100%;
width: max-content;
}
.error.highlighted > span {
color: var(--twoslash-error-color) !important;
}
.error.highlighted.runtime-error {
background-color: #f8585822;
border-left: 3px solid var(--ark-runtime-error);
}
.error.highlighted.runtime-error > span {
color: var(--ark-runtime-error) !important;
}
/** .twoslash-error matches errors added by twoslash itself, e.g. type errors */
.twoslash .twoslash-error {
/* Override the built-in error squiggle to match our theme */
background: url("/image/errorSquiggle.svg") repeat-x bottom left;
}
.twoslash .twoslash-popup-code {
white-space: pre;
}
/* avoid double padding + border */
/* matches popups rendered from react (on the home page) */
.shiki .shiki,
/* matches popups rendered from mdx (on most docs pages) */
.twoslash-popup-container pre.p-4 {
padding: 0px;
border-width: 0px;
}
/** display runtime errors on hover */
.twoslash .twoslash-popup-docs {
color: var(--ark-runtime-error);
font-size: small;
white-space: pre;
}
/** avoid empty lines being rendered with 0 height */
.twoslash .line {
min-height: 20px;
}
.completions-block code {
padding-bottom: 2rem;
}
/** avoid a janky white outline on hovers:
https://github.com/arktypeio/arktype/issues/1217 */
:focus-visible {
outline: none;
}
/* Firefox specific rules */
@-moz-document url-prefix() {
/* The backdrop-filter above doesn't work by default yet on Firefox so we do this instead */
.twoslash .twoslash-hover:hover .twoslash-popup-container {
background: #001323ee;
}
}
/* allow us to inject a badge at order 1 */
#nd-sidebar .lucide-chevron-down {
order: 2;
}
#nd-home-layout,
#nd-nav {
overflow: hidden;
transition: margin-top 0.3s ease;
}
/* if release banner is visible, add top offset to home navbar and layout equal to its height */
:root:has(.release-banner:not([hidden]):not(.hidden)) #nd-home-layout,
:root:has(.release-banner:not([hidden]):not(.hidden)) #nd-nav {
margin-top: 3.5rem;
}
.glass-container,
.monaco-editor {
box-shadow:
0 10px 15px 0 rgba(0, 0, 0, 0.3),
0 15px 30px 0 rgba(0, 0, 0, 0.22);
backdrop-filter: blur(16px);
/* without this Monaco ends up adding a 1px outline at the top of the editor for some reason */
outline-width: 0px !important;
}
.monaco-editor,
.overflow-guard {
border-radius: 16px;
}
/* Chrome/Safari/Edge scrollbar styling */
::-webkit-scrollbar {
width: 8px;
height: 8px;
background-color: transparent;
}
::-webkit-scrollbar-thumb {
background-color: rgba(255, 255, 255, 0.1);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background-color: rgba(255, 255, 255, 0.2);
}
::-webkit-scrollbar-track {
background: transparent;
}
/* Firefox scrollbar styling */
* {
scrollbar-width: thin;
scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}
.wiggle-animation {
animation: wiggle 4s ease-in-out infinite;
transform-origin: center center;
}
@keyframes wiggle {
0%,
87.5%,
100% {
transform: rotate(0deg);
}
88.5% {
transform: rotate(1.5deg);
}
89.5% {
transform: rotate(-0.5deg);
}
90.5% {
transform: rotate(-1.5deg);
}
91.5% {
transform: rotate(1deg);
}
92.5% {
transform: rotate(1.5deg);
}
93.5% {
transform: rotate(-1deg);
}
94.5% {
transform: rotate(-0.5deg);
}
96% {
transform: rotate(0.25deg);
}
98% {
transform: rotate(0deg);
}
}
h1,
h2,
h3,
h4,
h5,
h6,
.hero-tagline {
font-family: var(--font-raleway);
}
body {
font-family: var(--font-atkinson);
}