a tool for shared writing and social publishing
1@import "tailwindcss";
2
3@theme inline {
4 --breakpoint-*: initial;
5 --breakpoint-sm: 640px;
6 --breakpoint-md: 960px;
7 --breakpoint-lg: 1280px;
8
9 --radius-*: initial;
10 --radius-none: 0;
11 --radius-md: 0.25rem;
12 --radius-lg: 0.5rem;
13 --radius-full: 9999px;
14
15 --color-*: initial;
16 --color-inherit: inherit;
17 --color-transparent: transparent;
18 --color-current: currentColor;
19 --color-primary: rgb(var(--primary));
20 --color-secondary: color-mix(
21 in oklab,
22 rgb(var(--primary)),
23 rgb(var(--bg-page)) 25%
24 );
25 --color-tertiary: color-mix(
26 in oklab,
27 rgb(var(--primary)),
28 rgb(var(--bg-page)) 55%
29 );
30 --color-border: color-mix(
31 in oklab,
32 rgb(var(--primary)),
33 rgb(var(--bg-page)) 75%
34 );
35 --color-border-light: color-mix(
36 in oklab,
37 rgb(var(--primary)),
38 rgb(var(--bg-page)) 85%
39 );
40 --color-white: #ffffff;
41 --color-accent-1: rgb(var(--accent-1));
42 --color-accent-2: rgb(var(--accent-2));
43 --color-accent-contrast: rgb(var(--accent-contrast));
44 --color-bg-leaflet: rgb(var(--bg-leaflet));
45 --color-bg-page: rgb(var(--bg-page));
46 --color-highlight-1: var(--highlight-1);
47 --color-highlight-2: rgb(var(--highlight-2));
48 --color-highlight-3: rgb(var(--highlight-3));
49 --color-test: #e18181;
50 --color-test-blue: #48d1ef;
51
52 --text-*: initial;
53 --text-xs: 0.75rem;
54 --text-sm: 0.875rem;
55 --text-base: 1rem;
56 --text-lg: 1.125rem;
57 --text-xl: 1.625rem;
58 --text-2xl: 2rem;
59
60 --shadow-sm: 0.9px 1.5px 1.7px -1.8px rgba(var(--primary), 0.2),
61 4.2px 6.9px 7.8px -3.5px rgba(var(--primary), 0.15);
62 --shadow-md: 1.2px 2.5px 2.7px -1.8px rgba(var(--primary), 0.1),
63 5.6px 11.6px 12.5px -3.5px rgba(var(--primary), 0.15);
64
65 --font-sans: var(--font-quattro);
66 --font-serif: Garamond;
67}
68
69/*
70 The default border color has changed to `currentcolor` in Tailwind CSS v4,
71 so we've added these compatibility styles to make sure everything still
72 looks the same as it did with Tailwind CSS v3.
73
74 If we ever want to remove these styles, we need to add an explicit border
75 color utility to any element that depends on these defaults.
76*/
77@layer base {
78 *,
79 ::after,
80 ::before,
81 ::backdrop,
82 ::file-selector-button {
83 border-color: var(--color-gray-200, currentcolor);
84 }
85}
86
87@layer base {
88 :root {
89 --bg-leaflet: 240, 247, 250;
90 --bg-page: 255, 255, 255;
91 --bg-page-alpha: 1;
92
93 --primary: 39, 39, 39;
94
95 --accent-1: 0, 0, 225;
96 --accent-2: 255, 255, 255;
97 --accent-contrast: 0, 0, 225;
98 --accent-1-is-contrast: "true";
99 --accent-light: color-mix(
100 in oklab,
101 rgb(var(--accent-contrast)),
102 rgb(var(--bg-page)) 85%
103 );
104
105 --highlight-1: 255, 177, 177;
106 --highlight-2: 253, 245, 203;
107 --highlight-3: 255, 205, 195;
108
109 --list-marker-width: 36px;
110 --page-width-unitless: min(
111 var(--page-width-setting),
112 calc(var(--leaflet-width-unitless) - 12)
113 );
114 --page-width-units: min(
115 calc(var(--page-width-unitless) * 1px),
116 calc(100vw - 12px)
117 );
118
119 --gripperSVG: url("/gripperPattern.svg");
120 --gripperSVG2: url("/gripperPattern2.svg");
121 --hatchSVG: url("/hatchPattern.svg");
122 --wavySVG: (url("/RSVPBackground/wavy.svg"));
123
124 --safe-padding-bottom: max(calc(env(safe-area-inset-bottom) - 8px), 16px);
125 }
126 @media (max-width: 640px) {
127 :root {
128 --list-marker-width: 20px;
129 }
130 }
131
132 @media (min-width: 640px) {
133 :root {
134 /*picks between max width and screen width with 64px of padding*/
135 --page-width-unitless: min(
136 var(--page-width-setting),
137 calc(var(--leaflet-width-unitless) - 128)
138 );
139 --page-width-units: min(
140 calc(var(--page-width-unitless) * 1px),
141 calc(100vw - 128px)
142 );
143 }
144 }
145
146 html,
147 body {
148 @apply h-full;
149 @apply p-0;
150 @apply overscroll-y-none;
151 min-height: -webkit-fill-available;
152 @apply font-sans;
153 font-synthesis: none;
154 }
155
156 #__next {
157 height: 100%;
158 }
159
160 /* START FONT STYLING */
161 h1 {
162 @apply text-2xl;
163 @apply font-bold;
164 }
165
166 h2 {
167 @apply text-xl;
168 @apply font-bold;
169 }
170
171 h3 {
172 @apply text-lg;
173 @apply font-bold;
174 }
175
176 h4 {
177 @apply text-base;
178 @apply font-bold;
179 }
180
181 p {
182 @apply text-base;
183 }
184
185 small {
186 @apply text-sm;
187 }
188
189 a {
190 @apply text-accent-contrast;
191 @apply hover:cursor-pointer;
192 @apply no-underline;
193 @apply hover:underline;
194 }
195
196 p {
197 font-size: inherit;
198 }
199
200 ::placeholder {
201 @apply text-tertiary;
202 @apply italic;
203 }
204
205 /* Scope custom fonts to document content only (not sidebar/UI chrome) */
206 .pageScrollWrapper,
207 .footnote-side-column,
208 .footnote-popover,
209 #interaction-drawer {
210 font-family: var(--theme-font, var(--font-quattro));
211 font-size: var(--theme-font-base-size, 16px);
212 }
213
214 .pageScrollWrapper h1,
215 .pageScrollWrapper h2,
216 .pageScrollWrapper h3,
217 .pageScrollWrapper h4 {
218 font-family: var(--theme-heading-font, var(--theme-font, var(--font-quattro)));
219 }
220
221 /* Scale heading sizes relative to the custom base font size */
222 .pageScrollWrapper h1 { font-size: 2em; }
223 .pageScrollWrapper h2 { font-size: 1.625em; }
224 .pageScrollWrapper h3 { font-size: 1.125em; }
225 .pageScrollWrapper h4 { font-size: 1em; }
226
227 /* Scale text size classes relative to the custom base font size.
228 Tailwind's text-sm/text-base/text-lg compile to fixed rem values
229 which ignore the custom base size set on .pageScrollWrapper. */
230 .pageScrollWrapper .textSizeSmall { font-size: 0.875em; }
231 .pageScrollWrapper .textSizeLarge { font-size: 1.125em; }
232
233 .pageScrollWrapper pre {
234 font-family: var(--theme-font, var(--font-quattro));
235 }
236
237 /* Apply custom fonts to publication homepage */
238 .pubWrapper {
239 font-family: var(--theme-font, var(--font-quattro));
240 }
241
242 .pubWrapper h1,
243 .pubWrapper h2,
244 .pubWrapper h3,
245 .pubWrapper h4 {
246 font-family: var(--theme-heading-font, var(--theme-font, var(--font-quattro)));
247 }
248 /*END FONT STYLING*/
249
250 /* START GLOBAL STYLING */
251
252 /* END GLOBAL STYLING */
253}
254
255img {
256 font-size: 0;
257}
258
259button:hover {
260 cursor: pointer;
261}
262
263blockquote {
264 margin: 0;
265}
266
267/* Hide scrollbar for Chrome, Safari and Opera */
268.no-scrollbar::-webkit-scrollbar {
269 display: none;
270}
271.no-scrollbar {
272 scrollbar-width: none;
273}
274
275input::-webkit-outer-spin-button,
276input::-webkit-inner-spin-button {
277 -webkit-appearance: none;
278 margin: 0;
279}
280input[type="number"] {
281 -moz-appearance: textfield;
282}
283
284::-webkit-calendar-picker-indicator {
285 mask-image: url(/timeInputIcon.svg);
286 mask-size: 100% 100%;
287 background-image: url(/gripperPattern1.svg);
288 background-color: color-mix(
289 in oklab,
290 rgb(var(--primary)),
291 rgb(var(--bg-page)) 55%
292 );
293}
294
295.inline-code {
296 display: inline;
297 font-size: 1em;
298 @apply bg-border-light;
299 @apply font-mono;
300 @apply px-px;
301 @apply py-px;
302 @apply -mx-px;
303 @apply -my-px;
304 @apply rounded-[4px];
305 @apply box-decoration-clone;
306}
307
308pre.shiki code {
309 display: block;
310}
311
312pre.shiki {
313 @apply sm:p-3;
314 @apply p-2;
315 @apply rounded-md;
316 @apply overflow-auto;
317 @apply sm:min-h-12;
318 @apply min-h-10;
319
320 @media (min-width: 640px) {
321 @apply p-3;
322 }
323}
324
325.highlight:has(+ .highlight) {
326 @apply rounded-r-none;
327}
328.highlight + .highlight {
329 @apply rounded-l-none;
330}
331
332.highlight {
333 @apply px-px;
334 @apply py-px;
335 @apply -mx-px;
336 @apply -my-px;
337 @apply rounded-[4px];
338 @apply box-decoration-clone;
339}
340
341.selection-highlight {
342 background-color: Highlight;
343 @apply py-[1.5px];
344}
345
346.ProseMirror:focus-within .selection-highlight {
347 background-color: transparent;
348}
349
350.ProseMirror .atMention.ProseMirror-selectednode,
351.ProseMirror .didMention.ProseMirror-selectednode {
352 @apply text-accent-contrast;
353 @apply px-0.5;
354 @apply rounded-[4px];
355 @apply box-decoration-clone;
356 background-color: rgba(var(--accent-contrast), 0.2);
357 border: 1px solid rgba(var(--accent-contrast), 1);
358}
359
360.mention {
361 @apply cursor-pointer;
362 @apply text-accent-contrast;
363 @apply px-0.5;
364 @apply rounded-[4px];
365 @apply box-decoration-clone;
366 background-color: rgba(var(--accent-contrast), 0.2);
367 border: 1px solid transparent;
368 display: inline;
369 white-space: normal;
370}
371
372.multiselected:focus-within .selection-highlight {
373 background-color: transparent;
374}
375
376.transparent-outline {
377 @apply outline-solid;
378 @apply outline-transparent;
379}
380
381.selected-outline {
382 @apply border;
383 @apply focus:outline-solid;
384 @apply focus:outline-2;
385 @apply focus:outline-offset-1;
386 @apply focus-within:outline-solid;
387 @apply focus-within:outline-2;
388 @apply focus-within:outline-offset-1;
389 @apply hover:outline-solid;
390 @apply hover:outline-2;
391 @apply hover:outline-offset-1;
392}
393
394.input-with-border {
395 @apply border;
396 @apply border-border;
397 @apply bg-bg-page;
398 @apply rounded-md;
399 @apply px-1;
400 @apply py-0.5;
401 @apply hover:border-tertiary;
402
403 @apply focus:border-tertiary;
404 @apply focus:outline-solid;
405 @apply focus:outline-tertiary;
406 @apply focus:outline-2;
407 @apply focus:outline-offset-1;
408
409 @apply focus-within:border-tertiary;
410 @apply focus-within:outline-solid;
411 @apply focus-within:outline-tertiary;
412 @apply focus-within:outline-2;
413 @apply focus-within:outline-offset-1;
414
415 @apply disabled:border-border-light;
416 @apply disabled:hover:border-border-light;
417 @apply disabled:bg-border-light;
418 @apply disabled:text-tertiary;
419}
420
421.block-border {
422 @apply border;
423 @apply border-border-light;
424 @apply rounded-lg;
425 @apply outline-solid;
426 @apply outline-offset-1;
427 @apply outline-2;
428 @apply outline-transparent;
429 @apply hover:border-border;
430}
431
432.block-border-selected {
433 @apply border;
434 @apply border-border;
435 @apply rounded-lg;
436 @apply outline-solid;
437 @apply outline-offset-1;
438 @apply outline-2;
439 @apply outline-border;
440}
441
442.blockquote {
443 @apply border-l-2;
444 @apply border-border;
445 @apply pl-3;
446 @apply ml-2;
447}
448
449.transparent-container {
450 @apply border;
451 @apply border-border-light;
452 @apply rounded-md;
453}
454
455.container {
456 background: rgba(var(--bg-page), 0.75);
457 @apply border;
458 @apply border-bg-page;
459 @apply rounded-md;
460}
461
462.opaque-container {
463 @apply bg-bg-page;
464 @apply border;
465 @apply border-border-light;
466 @apply rounded-md;
467}
468
469.accent-container {
470 background: color-mix(
471 in oklab,
472 rgb(var(--accent-contrast)),
473 rgb(var(--bg-page)) 85%
474 );
475 @apply rounded-md;
476}
477
478.menuItem {
479 @apply text-secondary;
480 @apply hover:text-secondary;
481 @apply data-highlighted:bg-[var(--accent-light)];
482 @apply data-highlighted:outline-none;
483 @apply hover:bg-[var(--accent-light)];
484 text-align: left;
485 font-weight: 800;
486 padding: 0.25rem 0.5rem;
487 border-radius: 0.25rem;
488 outline: none !important;
489 cursor: pointer;
490 background-color: transparent;
491 display: flex;
492 gap: 0.5rem;
493
494 :hover {
495 text-decoration: none !important;
496 background-color: rgb(var(--accent-light));
497 }
498}
499
500.pwa-padding {
501 padding-top: max(calc(env(safe-area-inset-top) - 8px)) !important;
502}
503.pwa-padding-bottom {
504 padding-bottom: var(--safe-padding-bottom);
505}
506
507/* animation for new star in publish success illustration */
508@keyframes new-star-animation {
509 0% {
510 transform: scale(0);
511 opacity: 0;
512 }
513 50% {
514 transform: scale(0.1);
515 opacity: 0;
516 }
517 80% {
518 transform: scale(1.2);
519 opacity: 1;
520 }
521 100% {
522 transform: scale(1);
523 }
524}
525
526.new-star {
527 animation-name: new-star-animation;
528 animation-duration: 1s;
529 animation-iteration-count: 1;
530 animation-timing-function: ease-in;
531}
532
533.footnote-scope {
534 counter-reset: footnote;
535}
536.footnote-ref {
537 counter-increment: footnote;
538 cursor: pointer;
539 color: rgb(var(--color-tertiary));
540 opacity: 0.7;
541}
542.footnote-ref::after {
543 content: counter(footnote);
544 vertical-align: super;
545 padding-left: 2px;
546 font-size: 75%;
547 line-height: 0rem;
548}
549.footnote-ref ~ br.ProseMirror-trailingBreak {
550 display: inline;
551 width: 4px;
552}
553.footnote-ref ~ img.ProseMirror-separator {
554 display: none;
555}
556
557.footnote-side-enter {
558 animation: footnote-fade-in 200ms ease-out;
559}
560@keyframes footnote-fade-in {
561 from {
562 opacity: 0;
563 transform: translateX(-8px);
564 }
565 to {
566 opacity: 1;
567 transform: translateX(0);
568 }
569}
570
571.footnote-side-item {
572 max-height: 4.5em;
573 overflow: hidden;
574 transition: max-height 200ms ease, mask-image 200ms ease;
575}
576.footnote-side-item.has-overflow {
577 mask-image: linear-gradient(to bottom, white 50%, transparent 100%);
578}
579.footnote-side-item:hover,
580.footnote-side-item:focus-within,
581.footnote-side-item.footnote-side-focused {
582 max-height: 40em;
583 mask-image: none;
584}