base.css
| 1 | /* View Transitions */ |
| 2 | @view-transition { |
| 3 | navigation: auto; |
| 4 | } |
| 5 | |
| 6 | .site-nav { |
| 7 | view-transition-name: site-nav; |
| 8 | } |
| 9 | .repo-header { |
| 10 | view-transition-name: repo-header; |
| 11 | } |
| 12 | .breadcrumb { |
| 13 | view-transition-name: breadcrumb; |
| 14 | } |
| 15 | |
| 16 | /* ============================================================ |
| 17 | @layer reset |
| 18 | ============================================================ */ |
| 19 | @layer reset { |
| 20 | *, |
| 21 | *::before, |
| 22 | *::after { |
| 23 | box-sizing: border-box; |
| 24 | margin: 0; |
| 25 | padding: 0; |
| 26 | } |
| 27 | |
| 28 | body { |
| 29 | min-height: 100dvh; |
| 30 | min-width: 500px; |
| 31 | } |
| 32 | img, |
| 33 | video { |
| 34 | max-width: 100%; |
| 35 | height: auto; |
| 36 | } |
| 37 | button, |
| 38 | input, |
| 39 | textarea, |
| 40 | select { |
| 41 | font: inherit; |
| 42 | } |
| 43 | a { |
| 44 | color: inherit; |
| 45 | } |
| 46 | ul, |
| 47 | ol { |
| 48 | list-style: none; |
| 49 | } |
| 50 | h1, |
| 51 | h2, |
| 52 | h3, |
| 53 | h4, |
| 54 | h5, |
| 55 | h6 { |
| 56 | font-weight: 600; |
| 57 | line-height: 1.2; |
| 58 | } |
| 59 | pre, |
| 60 | code { |
| 61 | font-family: var(--font-mono); |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | /* ============================================================ |
| 66 | @layer tokens |
| 67 | ============================================================ */ |
| 68 | @layer tokens { |
| 69 | :root { |
| 70 | /* Colors — light */ |
| 71 | --color-bg: #ffffff; |
| 72 | --color-bg-subtle: #f6f8fa; |
| 73 | --color-bg-inset: #eef0f2; |
| 74 | --color-border: #d0d7de; |
| 75 | --color-border-muted: #e4e7eb; |
| 76 | --color-text: #1f2328; |
| 77 | --color-text-muted: #656d76; |
| 78 | --color-link: #0969da; |
| 79 | --color-link-hover: #0550ae; |
| 80 | |
| 81 | --color-accent: #fd7e14; |
| 82 | --color-accent-bg: #fff3cd; |
| 83 | |
| 84 | --color-success: #1a7f37; |
| 85 | --color-success-bg: #dafbe1; |
| 86 | --color-danger: #cf222e; |
| 87 | --color-danger-bg: #ffebe9; |
| 88 | --color-warning: #9a6700; |
| 89 | --color-warning-bg: #fff8c5; |
| 90 | --color-merged: #8250df; |
| 91 | --color-merged-bg: #fbefff; |
| 92 | |
| 93 | /* Typography */ |
| 94 | --font-sans: |
| 95 | system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; |
| 96 | --font-mono: |
| 97 | ui-monospace, "Cascadia Code", "Source Code Pro", monospace; |
| 98 | |
| 99 | --text-xs: 0.75rem; |
| 100 | --text-sm: 0.875rem; |
| 101 | --text-base: 1rem; |
| 102 | --text-lg: 1.125rem; |
| 103 | --text-xl: 1.25rem; |
| 104 | --text-2xl: 1.5rem; |
| 105 | --text-3xl: 1.875rem; |
| 106 | |
| 107 | /* Spacing */ |
| 108 | --space-1: 0.25rem; |
| 109 | --space-2: 0.5rem; |
| 110 | --space-3: 0.75rem; |
| 111 | --space-4: 1rem; |
| 112 | --space-5: 1.25rem; |
| 113 | --space-6: 1.5rem; |
| 114 | --space-8: 2rem; |
| 115 | --space-10: 2.5rem; |
| 116 | --space-12: 3rem; |
| 117 | --space-16: 4rem; |
| 118 | |
| 119 | /* Border radius */ |
| 120 | --radius-sm: 4px; |
| 121 | --radius-md: 6px; |
| 122 | --radius-lg: 8px; |
| 123 | --radius-full: 9999px; |
| 124 | |
| 125 | /* Shadows */ |
| 126 | --shadow-sm: 0 1px 0 rgba(27, 31, 36, 0.04); |
| 127 | --shadow-md: 0 3px 6px rgba(140, 149, 159, 0.15); |
| 128 | --shadow-lg: 0 8px 24px rgba(140, 149, 159, 0.2); |
| 129 | } |
| 130 | |
| 131 | @media (prefers-color-scheme: dark) { |
| 132 | :root { |
| 133 | --color-bg: #0d1117; |
| 134 | --color-bg-subtle: #161b22; |
| 135 | --color-bg-inset: #1c2128; |
| 136 | --color-border: #30363d; |
| 137 | --color-border-muted: #21262d; |
| 138 | --color-text: #e6edf3; |
| 139 | --color-text-muted: #7d8590; |
| 140 | --color-link: #58a6ff; |
| 141 | --color-link-hover: #79c0ff; |
| 142 | |
| 143 | --color-accent: #f0883e; |
| 144 | --color-accent-bg: #3d2f00; |
| 145 | |
| 146 | --color-success: #3fb950; |
| 147 | --color-success-bg: #0d2b19; |
| 148 | --color-danger: #f85149; |
| 149 | --color-danger-bg: #2d1419; |
| 150 | --color-warning: #d29922; |
| 151 | --color-warning-bg: #2c2000; |
| 152 | --color-merged: #bc8cff; |
| 153 | --color-merged-bg: #1e0b3e; |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | /* Explicit theme overrides — applied via data-theme attribute set by cookie */ |
| 158 | :root[data-theme="dark"] { |
| 159 | --color-bg: #0d1117; |
| 160 | --color-bg-subtle: #161b22; |
| 161 | --color-bg-inset: #1c2128; |
| 162 | --color-border: #30363d; |
| 163 | --color-border-muted: #21262d; |
| 164 | --color-text: #e6edf3; |
| 165 | --color-text-muted: #7d8590; |
| 166 | --color-link: #58a6ff; |
| 167 | --color-link-hover: #79c0ff; |
| 168 | --color-accent: #f0883e; |
| 169 | --color-accent-bg: #3d2f00; |
| 170 | --color-success: #3fb950; |
| 171 | --color-success-bg: #0d2b19; |
| 172 | --color-danger: #f85149; |
| 173 | --color-danger-bg: #2d1419; |
| 174 | --color-warning: #d29922; |
| 175 | --color-warning-bg: #2c2000; |
| 176 | --color-merged: #bc8cff; |
| 177 | --color-merged-bg: #1e0b3e; |
| 178 | } |
| 179 | :root[data-theme="light"] { |
| 180 | --color-bg: #ffffff; |
| 181 | --color-bg-subtle: #f6f8fa; |
| 182 | --color-bg-inset: #eef0f2; |
| 183 | --color-border: #d0d7de; |
| 184 | --color-border-muted: #e4e7eb; |
| 185 | --color-text: #1f2328; |
| 186 | --color-text-muted: #656d76; |
| 187 | --color-link: #0969da; |
| 188 | --color-link-hover: #0550ae; |
| 189 | --color-accent: #fd7e14; |
| 190 | --color-accent-bg: #fff3cd; |
| 191 | --color-success: #1a7f37; |
| 192 | --color-success-bg: #dafbe1; |
| 193 | --color-danger: #cf222e; |
| 194 | --color-danger-bg: #ffebe9; |
| 195 | --color-warning: #9a6700; |
| 196 | --color-warning-bg: #fff8c5; |
| 197 | --color-merged: #8250df; |
| 198 | --color-merged-bg: #fbefff; |
| 199 | } |
| 200 | } |
| 201 | |
| 202 | /* ============================================================ |
| 203 | @layer layout |
| 204 | ============================================================ */ |
| 205 | @layer layout { |
| 206 | body { |
| 207 | font-family: var(--font-sans); |
| 208 | font-size: var(--text-base); |
| 209 | color: var(--color-text); |
| 210 | background: var(--color-bg); |
| 211 | display: grid; |
| 212 | grid-template-rows: auto 1fr auto; |
| 213 | min-height: 100dvh; |
| 214 | } |
| 215 | |
| 216 | .site-header { |
| 217 | background: var(--color-bg-subtle); |
| 218 | border-bottom: 1px solid var(--color-border); |
| 219 | position: sticky; |
| 220 | top: 0; |
| 221 | z-index: 100; |
| 222 | } |
| 223 | |
| 224 | .site-nav { |
| 225 | max-width: 1200px; |
| 226 | margin: 0 auto; |
| 227 | padding: var(--space-3) var(--space-4); |
| 228 | display: flex; |
| 229 | align-items: center; |
| 230 | gap: var(--space-4); |
| 231 | } |
| 232 | |
| 233 | .site-logo { |
| 234 | display: flex; |
| 235 | align-items: center; |
| 236 | gap: var(--space-2); |
| 237 | text-decoration: none; |
| 238 | font-weight: 700; |
| 239 | font-size: var(--text-lg); |
| 240 | color: var(--color-text); |
| 241 | } |
| 242 | |
| 243 | .logo-icon { |
| 244 | width: 1.6em; |
| 245 | height: 1.6em; |
| 246 | display: block; |
| 247 | flex-shrink: 0; |
| 248 | } |
| 249 | |
| 250 | .nav-links { |
| 251 | margin-left: auto; |
| 252 | display: flex; |
| 253 | align-items: center; |
| 254 | gap: var(--space-3); |
| 255 | } |
| 256 | |
| 257 | .site-main { |
| 258 | padding: var(--space-8) var(--space-4); |
| 259 | min-width: 0; |
| 260 | } |
| 261 | |
| 262 | .site-footer { |
| 263 | text-align: center; |
| 264 | padding: var(--space-6) var(--space-4); |
| 265 | font-size: var(--text-sm); |
| 266 | color: var(--color-text-muted); |
| 267 | border-top: 1px solid var(--color-border); |
| 268 | } |
| 269 | |
| 270 | .container { |
| 271 | max-width: 1000px; |
| 272 | margin: 0 auto; |
| 273 | overflow-x: clip; |
| 274 | } |
| 275 | |
| 276 | .container-narrow { |
| 277 | max-width: 680px; |
| 278 | } |
| 279 | |
| 280 | .inline-form { |
| 281 | display: inline; |
| 282 | } |
| 283 | |
| 284 | /* --- Two-step delete confirmation --- */ |
| 285 | .confirm-details { |
| 286 | position: relative; |
| 287 | display: inline-block; |
| 288 | } |
| 289 | .confirm-details > summary { |
| 290 | list-style: none; |
| 291 | } |
| 292 | |
| 293 | .confirm-popup { |
| 294 | position: absolute; |
| 295 | right: 0; |
| 296 | top: calc(100% + var(--space-1)); |
| 297 | background: var(--color-bg); |
| 298 | border: 1px solid var(--color-border); |
| 299 | border-radius: var(--radius-md); |
| 300 | padding: var(--space-3) var(--space-4); |
| 301 | display: flex; |
| 302 | align-items: center; |
| 303 | gap: var(--space-3); |
| 304 | white-space: nowrap; |
| 305 | z-index: 100; |
| 306 | font-size: var(--text-sm); |
| 307 | color: var(--color-text-muted); |
| 308 | } |
| 309 | } |
| 310 |