| 1 | @import "tailwindcss" source("."); |
| 2 | @import "@g1t/theme/tokens.css"; |
| 3 | |
| 4 | /* Tailwind's names for the shared g1t tokens. */ |
| 5 | @theme { |
| 6 | --font-sans: var(--g1t-font-sans); |
| 7 | --font-mono: var(--g1t-font-mono); |
| 8 | |
| 9 | --color-bg: var(--g1t-bg); |
| 10 | --color-surface: var(--g1t-surface); |
| 11 | --color-raised: var(--g1t-raised); |
| 12 | --color-line: var(--g1t-line); |
| 13 | --color-line-strong: var(--g1t-line-strong); |
| 14 | |
| 15 | --color-fg: var(--g1t-fg); |
| 16 | --color-fg-soft: var(--g1t-fg-soft); |
| 17 | --color-muted: var(--g1t-muted); |
| 18 | --color-faint: var(--g1t-faint); |
| 19 | |
| 20 | --color-accent: var(--g1t-accent); |
| 21 | --color-accent-dim: var(--g1t-accent-dim); |
| 22 | |
| 23 | --color-info: var(--g1t-info); |
| 24 | --color-merged: var(--g1t-merged); |
| 25 | --color-warn: var(--g1t-warn); |
| 26 | --color-danger: var(--g1t-danger); |
| 27 | |
| 28 | --animate-fade-up: fade-up 0.6s ease-out both; |
| 29 | --animate-dash: dash 1.2s linear infinite; |
| 30 | } |
| 31 | |
| 32 | @keyframes fade-up { |
| 33 | from { |
| 34 | opacity: 0; |
| 35 | transform: translateY(8px); |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | @keyframes dash { |
| 40 | to { |
| 41 | stroke-dashoffset: -16; |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | html { |
| 46 | color-scheme: dark; |
| 47 | scroll-behavior: smooth; |
| 48 | } |
| 49 | |
| 50 | body { |
| 51 | @apply bg-bg font-sans text-fg antialiased; |
| 52 | font-feature-settings: "cv11", "ss01"; |
| 53 | } |
| 54 | |
| 55 | ::selection { |
| 56 | background: color-mix(in srgb, var(--color-accent) 35%, transparent); |
| 57 | } |
| 58 | |
| 59 | /* In the base layer, so a component can opt out with a utility. */ |
| 60 | @layer base { |
| 61 | :focus-visible { |
| 62 | outline: 2px solid var(--color-accent); |
| 63 | outline-offset: 2px; |
| 64 | } |
| 65 | |
| 66 | /* |
| 67 | * A grid's items may shrink below their content. Without this, one long |
| 68 | * line that does not wrap (a command, a commit hash, an address) widens |
| 69 | * the whole column, and on a phone the page scrolls sideways. |
| 70 | */ |
| 71 | .grid > * { |
| 72 | min-width: 0; |
| 73 | } |
| 74 | |
| 75 | /* Checkboxes, radios and ranges in g1t's own colour, not the browser's. */ |
| 76 | :root { |
| 77 | accent-color: var(--color-accent); |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | @media (prefers-reduced-motion: reduce) { |
| 82 | *, |
| 83 | *::before, |
| 84 | *::after { |
| 85 | animation: none !important; |
| 86 | scroll-behavior: auto !important; |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | /* Rendered markdown: READMEs, briefs and docs. */ |
| 91 | .prose > :first-child { |
| 92 | margin-top: 0; |
| 93 | padding-top: 0; |
| 94 | } |
| 95 | .prose { |
| 96 | @apply leading-7 text-fg; |
| 97 | } |
| 98 | .prose > * + * { |
| 99 | @apply mt-4; |
| 100 | } |
| 101 | .prose h1 { |
| 102 | @apply mt-0 text-3xl font-semibold tracking-tight; |
| 103 | } |
| 104 | .prose h2 { |
| 105 | @apply mt-10 border-b border-line pb-2 text-xl font-semibold tracking-tight; |
| 106 | } |
| 107 | .prose h3 { |
| 108 | @apply mt-8 text-base font-semibold; |
| 109 | } |
| 110 | .prose p, |
| 111 | .prose li { |
| 112 | @apply text-[0.9375rem] text-fg/90; |
| 113 | } |
| 114 | .prose a { |
| 115 | @apply text-accent underline decoration-accent/40 underline-offset-4 hover:decoration-accent; |
| 116 | } |
| 117 | .prose ul { |
| 118 | @apply list-disc space-y-1.5 pl-6; |
| 119 | } |
| 120 | .prose ol { |
| 121 | @apply list-decimal space-y-1.5 pl-6; |
| 122 | } |
| 123 | .prose code { |
| 124 | @apply rounded bg-raised px-1.5 py-0.5 font-mono text-[0.85em]; |
| 125 | } |
| 126 | .prose pre { |
| 127 | @apply overflow-x-auto rounded-lg border border-line bg-surface p-4 font-mono text-sm leading-6; |
| 128 | } |
| 129 | .prose pre code { |
| 130 | @apply bg-transparent p-0; |
| 131 | } |
| 132 | .prose blockquote { |
| 133 | @apply border-l-2 border-line-strong pl-4 text-muted; |
| 134 | } |
| 135 | .prose table { |
| 136 | @apply w-full border-collapse text-sm; |
| 137 | } |
| 138 | .prose th { |
| 139 | @apply border-b border-line-strong px-3 py-2 text-left font-medium text-muted; |
| 140 | } |
| 141 | .prose td { |
| 142 | @apply border-b border-line px-3 py-2 align-top; |
| 143 | } |
| 144 | .prose hr { |
| 145 | @apply border-line; |
| 146 | } |
| 147 | .prose h4 { |
| 148 | @apply mt-6 text-sm font-semibold; |
| 149 | } |
| 150 | .prose li.task-list-item { |
| 151 | @apply list-none; |
| 152 | } |
| 153 | .prose ul.contains-task-list { |
| 154 | @apply pl-1; |
| 155 | } |
| 156 | .prose kbd { |
| 157 | @apply rounded border border-line-strong bg-raised px-1.5 py-px font-mono text-[0.8em] shadow-[inset_0_-1px_0_var(--color-line-strong)]; |
| 158 | } |
| 159 | .prose del { |
| 160 | @apply text-muted; |
| 161 | } |
| 162 | .prose details { |
| 163 | @apply rounded-lg border border-line px-4 py-2; |
| 164 | } |
| 165 | .prose summary { |
| 166 | @apply cursor-pointer font-medium; |
| 167 | } |
| 168 | .prose img { |
| 169 | @apply inline max-w-full; |
| 170 | } |
| 171 | .prose section[data-footnotes] { |
| 172 | @apply mt-10 border-t border-line pt-4 text-sm text-muted; |
| 173 | } |
| 174 | .prose a[data-footnote-ref] { |
| 175 | @apply no-underline; |
| 176 | } |
| 177 | |
| 178 | /* Syntax-highlighted code from Shiki. */ |
| 179 | .shiki { |
| 180 | @apply bg-transparent! font-mono text-sm leading-6; |
| 181 | } |
| 182 | .shiki code { |
| 183 | counter-reset: line; |
| 184 | display: block; |
| 185 | } |
| 186 | .shiki .line::before { |
| 187 | counter-increment: line; |
| 188 | content: counter(line); |
| 189 | @apply mr-5 inline-block w-10 text-right text-faint select-none; |
| 190 | } |
| 191 | |
| 192 | /* Artwork: dashes that flow along a track. */ |
| 193 | .art-flow { |
| 194 | animation: dash 1.6s linear infinite; |
| 195 | } |
| 196 | @media (prefers-reduced-motion: reduce) { |
| 197 | .art-flow { |
| 198 | animation: none; |
| 199 | } |
| 200 | } |
| 201 | |
| 202 | /* |
| 203 | * Behind the landing page's opening: the same dark gray, with a faint |
| 204 | * lavender and peach glow low on the horizon and a few stars. |
| 205 | */ |
| 206 | .dusk { |
| 207 | background: |
| 208 | radial-gradient(1px 1px at 12% 18%, rgb(255 255 255 / 0.35), transparent), |
| 209 | radial-gradient(1px 1px at 27% 8%, rgb(255 255 255 / 0.25), transparent), |
| 210 | radial-gradient(1px 1px at 63% 12%, rgb(255 255 255 / 0.3), transparent), |
| 211 | radial-gradient(1.5px 1.5px at 90% 9%, rgb(255 255 255 / 0.35), transparent), |
| 212 | radial-gradient(60% 35% at 50% 100%, rgb(255 189 140 / 0.08), transparent 70%), |
| 213 | radial-gradient(80% 45% at 50% 100%, rgb(182 168 255 / 0.1), transparent 75%), |
| 214 | var(--color-bg); |
| 215 | } |
| 216 | /* A planet rising behind the horizon, its lit edge catching the glow. */ |
| 217 | .dusk-planet { |
| 218 | background: radial-gradient(circle at 70% 30%, rgb(182 168 255 / 0.12), rgb(255 189 140 / 0.04) 45%, transparent 70%); |
| 219 | box-shadow: inset 14px -8px 50px rgb(255 214 186 / 0.07); |
| 220 | } |