a tool for shared writing and social publishing
at feature/footnotes 569 lines 12 kB view raw
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 font-family: var(--theme-font, var(--font-quattro)); 208 font-size: var(--theme-font-base-size, 16px); 209 } 210 211 .pageScrollWrapper h1, 212 .pageScrollWrapper h2, 213 .pageScrollWrapper h3, 214 .pageScrollWrapper h4 { 215 font-family: var(--theme-heading-font, var(--theme-font, var(--font-quattro))); 216 } 217 218 /* Scale heading sizes relative to the custom base font size */ 219 .pageScrollWrapper h1 { font-size: 2em; } 220 .pageScrollWrapper h2 { font-size: 1.625em; } 221 .pageScrollWrapper h3 { font-size: 1.125em; } 222 .pageScrollWrapper h4 { font-size: 1em; } 223 224 /* Scale text size classes relative to the custom base font size. 225 Tailwind's text-sm/text-base/text-lg compile to fixed rem values 226 which ignore the custom base size set on .pageScrollWrapper. */ 227 .pageScrollWrapper .textSizeSmall { font-size: 0.875em; } 228 .pageScrollWrapper .textSizeLarge { font-size: 1.125em; } 229 230 .pageScrollWrapper pre { 231 font-family: var(--theme-font, var(--font-quattro)); 232 } 233 /*END FONT STYLING*/ 234 235 /* START GLOBAL STYLING */ 236 237 /* END GLOBAL STYLING */ 238} 239 240img { 241 font-size: 0; 242} 243 244button:hover { 245 cursor: pointer; 246} 247 248blockquote { 249 margin: 0; 250} 251 252/* Hide scrollbar for Chrome, Safari and Opera */ 253.no-scrollbar::-webkit-scrollbar { 254 display: none; 255} 256.no-scrollbar { 257 scrollbar-width: none; 258} 259 260input::-webkit-outer-spin-button, 261input::-webkit-inner-spin-button { 262 -webkit-appearance: none; 263 margin: 0; 264} 265input[type="number"] { 266 -moz-appearance: textfield; 267} 268 269::-webkit-calendar-picker-indicator { 270 mask-image: url(/timeInputIcon.svg); 271 mask-size: 100% 100%; 272 background-image: url(/gripperPattern1.svg); 273 background-color: color-mix( 274 in oklab, 275 rgb(var(--primary)), 276 rgb(var(--bg-page)) 55% 277 ); 278} 279 280.inline-code { 281 display: inline; 282 font-size: 1em; 283 @apply bg-border-light; 284 @apply font-mono; 285 @apply px-px; 286 @apply py-px; 287 @apply -mx-px; 288 @apply -my-px; 289 @apply rounded-[4px]; 290 @apply box-decoration-clone; 291} 292 293pre.shiki code { 294 display: block; 295} 296 297pre.shiki { 298 @apply sm:p-3; 299 @apply p-2; 300 @apply rounded-md; 301 @apply overflow-auto; 302 @apply sm:min-h-12; 303 @apply min-h-10; 304 305 @media (min-width: 640px) { 306 @apply p-3; 307 } 308} 309 310.highlight:has(+ .highlight) { 311 @apply rounded-r-none; 312} 313.highlight + .highlight { 314 @apply rounded-l-none; 315} 316 317.highlight { 318 @apply px-px; 319 @apply py-px; 320 @apply -mx-px; 321 @apply -my-px; 322 @apply rounded-[4px]; 323 @apply box-decoration-clone; 324} 325 326.selected .selection-highlight { 327 background-color: Highlight; 328 @apply py-[1.5px]; 329} 330 331.ProseMirror:focus-within .selection-highlight { 332 background-color: transparent; 333} 334 335.ProseMirror .atMention.ProseMirror-selectednode, 336.ProseMirror .didMention.ProseMirror-selectednode { 337 @apply text-accent-contrast; 338 @apply px-0.5; 339 @apply rounded-[4px]; 340 @apply box-decoration-clone; 341 background-color: rgba(var(--accent-contrast), 0.2); 342 border: 1px solid rgba(var(--accent-contrast), 1); 343} 344 345.mention { 346 @apply cursor-pointer; 347 @apply text-accent-contrast; 348 @apply px-0.5; 349 @apply rounded-[4px]; 350 @apply box-decoration-clone; 351 background-color: rgba(var(--accent-contrast), 0.2); 352 border: 1px solid transparent; 353 display: inline; 354 white-space: normal; 355} 356 357.multiselected:focus-within .selection-highlight { 358 background-color: transparent; 359} 360 361.transparent-outline { 362 @apply outline-solid; 363 @apply outline-transparent; 364} 365 366.selected-outline { 367 @apply border; 368 @apply focus:outline-solid; 369 @apply focus:outline-2; 370 @apply focus:outline-offset-1; 371 @apply focus-within:outline-solid; 372 @apply focus-within:outline-2; 373 @apply focus-within:outline-offset-1; 374 @apply hover:outline-solid; 375 @apply hover:outline-2; 376 @apply hover:outline-offset-1; 377} 378 379.input-with-border { 380 @apply border; 381 @apply border-border; 382 @apply bg-bg-page; 383 @apply rounded-md; 384 @apply px-1; 385 @apply py-0.5; 386 @apply hover:border-tertiary; 387 388 @apply focus:border-tertiary; 389 @apply focus:outline-solid; 390 @apply focus:outline-tertiary; 391 @apply focus:outline-2; 392 @apply focus:outline-offset-1; 393 394 @apply focus-within:border-tertiary; 395 @apply focus-within:outline-solid; 396 @apply focus-within:outline-tertiary; 397 @apply focus-within:outline-2; 398 @apply focus-within:outline-offset-1; 399 400 @apply disabled:border-border-light; 401 @apply disabled:hover:border-border-light; 402 @apply disabled:bg-border-light; 403 @apply disabled:text-tertiary; 404} 405 406.block-border { 407 @apply border; 408 @apply border-border-light; 409 @apply rounded-lg; 410 @apply outline-solid; 411 @apply outline-offset-1; 412 @apply outline-2; 413 @apply outline-transparent; 414 @apply hover:border-border; 415} 416 417.block-border-selected { 418 @apply border; 419 @apply border-border; 420 @apply rounded-lg; 421 @apply outline-solid; 422 @apply outline-offset-1; 423 @apply outline-2; 424 @apply outline-border; 425} 426 427.blockquote { 428 @apply border-l-2; 429 @apply border-border; 430 @apply pl-3; 431 @apply ml-2; 432} 433 434.transparent-container { 435 @apply border; 436 @apply border-border-light; 437 @apply rounded-md; 438} 439 440.container { 441 background: rgba(var(--bg-page), 0.75); 442 @apply border; 443 @apply border-bg-page; 444 @apply rounded-md; 445} 446 447.opaque-container { 448 @apply bg-bg-page; 449 @apply border; 450 @apply border-border-light; 451 @apply rounded-md; 452} 453 454.accent-container { 455 background: color-mix( 456 in oklab, 457 rgb(var(--accent-contrast)), 458 rgb(var(--bg-page)) 85% 459 ); 460 @apply rounded-md; 461} 462 463.menuItem { 464 @apply text-secondary; 465 @apply hover:text-secondary; 466 @apply data-highlighted:bg-[var(--accent-light)]; 467 @apply data-highlighted:outline-none; 468 @apply hover:bg-[var(--accent-light)]; 469 text-align: left; 470 font-weight: 800; 471 padding: 0.25rem 0.5rem; 472 border-radius: 0.25rem; 473 outline: none !important; 474 cursor: pointer; 475 background-color: transparent; 476 display: flex; 477 gap: 0.5rem; 478 479 :hover { 480 text-decoration: none !important; 481 background-color: rgb(var(--accent-light)); 482 } 483} 484 485.pwa-padding { 486 padding-top: max(calc(env(safe-area-inset-top) - 8px)) !important; 487} 488.pwa-padding-bottom { 489 padding-bottom: var(--safe-padding-bottom); 490} 491 492/* animation for new star in publish success illustration */ 493@keyframes new-star-animation { 494 0% { 495 transform: scale(0); 496 opacity: 0; 497 } 498 50% { 499 transform: scale(0.1); 500 opacity: 0; 501 } 502 80% { 503 transform: scale(1.2); 504 opacity: 1; 505 } 506 100% { 507 transform: scale(1); 508 } 509} 510 511.new-star { 512 animation-name: new-star-animation; 513 animation-duration: 1s; 514 animation-iteration-count: 1; 515 animation-timing-function: ease-in; 516} 517 518.footnote-scope { 519 counter-reset: footnote; 520} 521.footnote-ref { 522 counter-increment: footnote; 523 cursor: pointer; 524 color: rgb(var(--color-tertiary)); 525 opacity: 0.7; 526} 527.footnote-ref::after { 528 content: counter(footnote); 529 vertical-align: super; 530 padding-left: 2px; 531 font-size: 75%; 532 line-height: 0rem; 533} 534.footnote-ref ~ br.ProseMirror-trailingBreak { 535 display: inline; 536 width: 4px; 537} 538.footnote-ref ~ img.ProseMirror-separator { 539 display: none; 540} 541 542.footnote-side-enter { 543 animation: footnote-fade-in 200ms ease-out; 544} 545@keyframes footnote-fade-in { 546 from { 547 opacity: 0; 548 transform: translateX(-8px); 549 } 550 to { 551 opacity: 1; 552 transform: translateX(0); 553 } 554} 555 556.footnote-side-item { 557 max-height: 4.5em; 558 overflow: hidden; 559 transition: max-height 200ms ease, mask-image 200ms ease; 560} 561.footnote-side-item.has-overflow { 562 mask-image: linear-gradient(to bottom, white 50%, transparent 100%); 563} 564.footnote-side-item:hover, 565.footnote-side-item:focus-within, 566.footnote-side-item.footnote-side-focused { 567 max-height: 40em; 568 mask-image: none; 569}