Flat
Join

Code

GPL v3 or later · 54 files · 1.2 MB

Read me What changed Versions and downloads

top / docs

docs/style.css · 15.1 KB · raw

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 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 /* Flat: the Lightmorphic product-site layout, shared with Talk. Plain CSS, one self-hosted font, no framework, no external requests. */ @font-face { font-family: "Manrope"; src: url("fonts/Manrope-VariableFont_wght.ttf") format("truetype"); font-weight: 200 800; font-display: swap; } :root { color-scheme: dark; --bg: #09090b; --fg: #fafafa; --panel: #1b1d29; --panel-border: rgba(255,255,255,.09); --border: #27272a; --muted: #1c1c1f; --muted-fg: #a1a1aa; --shadow-panel: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px -16px rgba(0,0,0,.6); --accent: #fbc711; --accent-hover: #ddaf0f; --on-accent: #645007; --accent-container: #4b3c05; --on-accent-container: #fde694; --brand-navy: #111827; --link: #2295f1; --success: #4bae4f; --warning: #ffc006; --radius: 0.875rem; --panel-radius: 1.375rem; --wrap: 68rem; /* The accent yellow reads at 12.6:1 on this background, so it is the focus ring here. */ --focus-ring: var(--accent); } * { box-sizing: border-box; } html { scroll-behavior: smooth; } @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } } body { margin: 0; background: var(--bg); color: var(--fg); font-family: "Manrope", system-ui, sans-serif; font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; } .wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; } a { color: var(--link); } a:focus-visible, button:focus-visible, .btn:focus-visible, summary:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; } .skip { position: absolute; left: -9999px; background: var(--panel); color: var(--fg); padding: .75rem 1rem; border-radius: var(--radius); z-index: 10; } .skip:focus { left: 1rem; top: 1rem; } h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; } h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; letter-spacing: -.02em; } h2 { font-size: 1.75rem; font-weight: 600; letter-spacing: -.01em; } h3 { font-size: 1.0625rem; font-weight: 600; } p { margin: 0 0 1rem; } p:last-child { margin-bottom: 0; } /* ---- nav ---------------------------------------------------------- */ .topnav { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--panel-border); } .topnav-inner { display: flex; align-items: center; gap: 1rem; padding: .3rem 0; } /* Padding moved from the bar onto each link rather than just added on top of it - a nav link's own clickable box was ~24px tall before this, under the 44px a touch target wants; this keeps the bar close to its old height while giving every link room of its own. */ .brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--fg); text-decoration: none; letter-spacing: -.01em; padding: .65rem 0; } .nav-links { margin-left: auto; display: flex; align-items: center; gap: 1.25rem; } .nav-links a { color: var(--muted-fg); text-decoration: none; font-size: .9375rem; font-weight: 600; padding: .65rem 0; } .nav-links a:hover { color: var(--fg); } @media (max-width: 40rem) { .nav-links .hide-sm { display: none; } } /* ---- buttons ------------------------------------------------------ */ .btn { display: inline-flex; align-items: center; gap: .5rem; border-radius: var(--radius); padding: .7rem 1.15rem; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; } .btn.primary { background: var(--accent); color: var(--on-accent); } .btn.primary:hover { background: var(--accent-hover); } .btn.ghost { background: var(--muted); color: var(--fg); border-color: var(--border); } .btn.ghost:hover { border-color: var(--muted-fg); } /* ---- hero --------------------------------------------------------- */ /* Uneven on purpose: the promise carries the weight, and the session check sits beside it as the one thing to verify before downloading. */ .hero { padding: 3.5rem 0 2rem; } .hero-grid { display: grid; gap: 2rem; grid-template-columns: 1.35fr 1fr; align-items: center; } @media (max-width: 60rem) { .hero-grid { grid-template-columns: 1fr; } } .eyebrow { display: inline-flex; align-items: center; gap: .5rem; background: var(--accent-container); color: var(--on-accent-container); border-radius: 999px; padding: .3rem .75rem; font-size: .8125rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; margin-bottom: 1rem; } .lede { font-size: 1.125rem; color: var(--muted-fg); max-width: 46ch; } .hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; } .hero-note { margin-top: 1rem; font-size: .8125rem; color: var(--muted-fg); } /* ---- panels / bento ------------------------------------------------ */ .panel { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--panel-radius); box-shadow: var(--shadow-panel); padding: 1.5rem; } section { padding: 2.5rem 0; } section[id] { scroll-margin-top: 5.5rem; } .section-intro { color: var(--muted-fg); max-width: 60ch; margin-bottom: 1.5rem; } /* Columns rather than a grid, so a short card does not leave a hole under it waiting for the row to end. Each card is as tall as its own text and the next one starts immediately below. A grid cannot do this: its rows are as tall as their tallest cell, which is what left a gap under "Six languages". */ .bento { columns: 2; column-gap: 1rem; } .bento > .panel { break-inside: avoid; -webkit-column-break-inside: avoid; margin-bottom: 1rem; } @media (max-width: 56rem) { .bento { columns: 1; } } .bento h3 { display: flex; align-items: center; gap: .5rem; } .bento p { color: var(--muted-fg); font-size: .9375rem; } .icon { flex: none; color: var(--accent); } /* ---- requirements -------------------------------------------------- */ .req ul { margin: .75rem 0 0; padding-left: 1.1rem; color: var(--muted-fg); } .req li { margin-bottom: .35rem; } .req pre { background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1rem; overflow-x: auto; font-size: .9375rem; margin: .75rem 0; } .req code { font-family: ui-monospace, Menlo, Consolas, monospace; } /* ---- download ------------------------------------------------------ */ .download .panel { display: grid; gap: 1rem; } .dl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; } .dl-meta { color: var(--muted-fg); font-size: .875rem; } .dl-help { color: var(--muted-fg); font-size: .9375rem; } /* ---- footer -------------------------------------------------------- */ .foot { border-top: 1px solid var(--panel-border); padding: 2.75rem 0 2.25rem; color: var(--muted-fg); font-size: .875rem; } .foot-inner { display: flex; flex-wrap: wrap; gap: 2rem 4rem; align-items: flex-start; justify-content: space-between; } /* The brand side carries the weight: mark, name, a line saying what this is, and who made it. Without it the row was an image at one edge and a list at the other with nothing in between. */ .foot-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; max-width: 52ch; } .foot-lockup { display: inline-flex; align-items: center; gap: .6rem; font-size: 1.0625rem; font-weight: 700; letter-spacing: -.01em; color: var(--fg); text-decoration: none; padding: .35rem 0; } .foot-lockup:hover { color: var(--accent); } .foot-tagline { margin: 0; color: var(--muted-fg); font-size: .875rem; line-height: 1.65; } .foot-nav { display: flex; flex-direction: column; margin-right: 3rem; } .foot-nav-title { margin: 0 0 .6rem; padding-bottom: .5rem; font-size: .75rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted-fg); border-bottom: 1px solid var(--panel-border); } /* Column-major: the list reads downwards and then across, the way a menu is read, rather than left-to-right along each row. */ .foot-nav-links { display: grid; grid-auto-flow: column; grid-template-rows: repeat(3, auto); column-gap: 3rem; } .foot-nav a { color: var(--fg); text-decoration: none; font-weight: 600; opacity: .8; } .foot-nav a:hover { opacity: 1; color: var(--accent); } .foot-nav a[aria-current="page"] { opacity: 1; color: var(--accent); } /* .7rem each side of a 22px line clears the 44px a touch target wants. */ .foot-nav a { display: inline-flex; align-items: center; padding: .7rem 0; } /* ---- questions ------------------------------------------------------ */ .faq-item { border-top: 1px solid var(--panel-border); } .faq-item:first-child { border-top: none; } .faq-item h3 { margin: 0; font-size: 1rem; } .faq-item summary { cursor: pointer; padding: .85rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; } .faq-item summary::-webkit-details-marker { display: none; } .faq-item summary::after { content: "+"; color: var(--muted-fg); font-weight: 400; } .faq-item[open] summary::after { content: "\2013"; } .faq-item p { color: var(--muted-fg); font-size: .9375rem; margin: 0 0 .95rem; max-width: 68ch; } /* The bar carries one more item than it used to: the all-apps launcher, which is the last thing on the right and has to stay reachable at every width. On a narrow screen the brand was also wrapping onto two lines, which pushed the bar to 83px tall and squeezed the links until Download ran off the edge. Keeping the name on one line and trimming the gaps buys back the room the launcher needs. */ @media (max-width: 40rem) { .brand { white-space: nowrap; font-size: .9375rem; gap: .4rem; } .topnav-inner { gap: .6rem; } .nav-links { gap: .85rem; } } /* ---- legal sub-footer ----------------------------------------------- */ .legal { border-top: 1px solid var(--panel-border); background: var(--bg); padding: 1.25rem 0 1.75rem; } .legal-inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: flex-start; justify-content: space-between; } .legal-text { margin: 0; color: var(--muted-fg); font-size: .8125rem; line-height: 1.6; } /* Each of the three lines breaks where its own <br> says, not where a measure runs out: the company line was wrapping mid-sentence. It still wraps on a screen too narrow to hold it, which is the one place wrapping is the right answer. */ .legal-links { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-left: auto; justify-content: flex-end; } .legal-links a { color: var(--muted-fg); text-decoration: none; font-size: .8125rem; font-weight: 600; padding: .55rem 0; } .legal-links a:hover { color: var(--fg); text-decoration: underline; } /* On a narrow screen the links go under the address rather than being squeezed against it, still reading left to right in the same order. */ @media (max-width: 46rem) { .legal-links { margin-left: 0; justify-content: flex-start; gap: 1rem; } } /* ---- legal pages ----------------------------------------------------- */ .legal-page { padding: 2.5rem 0 1rem; } .legal-page h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); margin: 0 0 .5rem; } .legal-page .updated { color: var(--muted-fg); font-size: .875rem; margin: 0 0 1.75rem; } .legal-body { max-width: 68ch; } .legal-body h2 { font-size: 1.25rem; margin: 2rem 0 .5rem; } .legal-body p, .legal-body li { color: var(--fg); line-height: 1.65; } .legal-body ul { padding-left: 1.15rem; } .legal-body li { margin: .35rem 0; } /* ---- open-source sub-footer ------------------------------------------ */ .gh-foot { border-top: 1px solid var(--panel-border); padding: 1.25rem 0; } .gh-inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; } .gh-marks { display: flex; align-items: center; gap: 1rem; } .gh-marks a { display: inline-flex; align-items: center; color: var(--muted-fg); padding: .4rem 0; } .gh-marks a:hover { color: var(--fg); } .gh-links { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-left: auto; justify-content: flex-end; } .gh-links a { color: var(--muted-fg); text-decoration: none; font-size: .875rem; padding: .55rem 0; } .gh-links a:hover { color: var(--fg); text-decoration: underline; } /* The legal links sit level with the last line of the address, as in the reference, rather than floating up beside the first. */ .legal-inner { align-items: flex-end; } @media (max-width: 46rem) { .gh-links { margin-left: 0; justify-content: flex-start; gap: 1rem; } .foot-nav { margin-right: 0; } } /* ---- Flat's own pieces ------------------------------------------------ */ /* The fresh-install routine, beside the promise: the one thing a visitor needs to picture before downloading. Numbered, because the order is the point. */ .routine { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--panel-radius); box-shadow: var(--shadow-panel); padding: 1.25rem 1.35rem; } .routine-title { font-size: .8125rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-fg); margin-bottom: .75rem; } .routine ol { list-style: none; margin: 0; padding: 0; counter-reset: step; } .routine li { counter-increment: step; display: flex; gap: .75rem; align-items: flex-start; padding: .55rem 0; border-top: 1px solid var(--panel-border); font-size: .9375rem; } .routine li:first-child { border-top: none; padding-top: 0; } .routine li::before { content: counter(step); flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--on-accent); font-size: .8125rem; font-weight: 800; } .routine b { display: block; color: var(--fg); } .routine span { color: var(--muted-fg); } .routine-note { margin-top: .75rem; font-size: .8125rem; color: var(--muted-fg); } /* Three steps across the page, numbered rather than edged: no coloured stripe down the side of anything. */ .steps { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); } @media (max-width: 48rem) { .steps { grid-template-columns: 1fr; } } .steps .panel { min-width: 0; } .step-num { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--accent-container); color: var(--on-accent-container); font-size: .875rem; font-weight: 800; margin-bottom: .6rem; } .steps h3 { margin-bottom: .3rem; } .steps p { color: var(--muted-fg); font-size: .9375rem; } /* A screenshot is a picture of the real app, framed like a panel. */ .shot { margin: 0; } .shot img { display: block; width: 100%; height: auto; border-radius: var(--panel-radius); border: 1px solid var(--panel-border); box-shadow: var(--shadow-panel); } .shot figcaption { margin-top: .6rem; font-size: .875rem; color: var(--muted-fg); } .shots { display: grid; gap: 1.5rem; grid-template-columns: 1fr 1fr; margin-top: 1.5rem; } @media (max-width: 56rem) { .shots { grid-template-columns: 1fr; } } /* Honest limits sit in a list, not behind a link. */ .limits ul { margin: 0; padding-left: 1.1rem; } .limits li { color: var(--muted-fg); margin: .45rem 0; } .limits li strong { color: var(--fg); } /* Nothing inside a panel paints outside it. */ .panel, .bento > .panel { min-width: 0; } .panel code, .panel p { overflow-wrap: anywhere; } .faq-item code, .req code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; }