@import '@garage44/mithril/components.css'; @import '@garage44/mithril/components/base.css'; /* The client's palette, generated: after the library's tokens, which it overrides. */ @import './theme.css'; @import '../cms/sitebar.css'; /* Each page's own rules, in a stylesheet beside the page or element it styles. */ @import '../components/elements/account/account.css'; @import '../components/elements/admin/update.css'; @import '../components/elements/buildings/buildings.css'; @import '../components/elements/providers/providers.css'; @import '../components/pages/accounts/accounts.css'; @import '../components/pages/building/building.css'; @import '../components/pages/buildings/buildings.css'; @import '../components/pages/tokens/tokens.css'; @import '../components/pages/chat/chat.css'; @import '../components/pages/chat/home.css'; @import '../components/pages/chat/calendar.css'; @import '../components/pages/claims/claims.css'; @import '../components/pages/content-pages/content-pages.css'; @import '../components/pages/library/library.css'; @import '../components/pages/login/login.css'; @import '../components/pages/feeds/feeds.css'; @import '../components/pages/overrides/overrides.css'; @import '../components/pages/pipeline/pipeline.css'; @import '../components/pages/reports/reports.css'; @import '../components/pages/stats/stats.css'; @import '../components/pages/roles/roles.css'; @import '../components/pages/signin-admin/signin-admin.css'; @import '../components/pages/welcome/welcome.css'; /* Glass and depth, last: it restyles the library's surfaces and the pages' rows. */ @import './depth.css'; /* * The palette is the client's. `theme.css` is generated from * `crates/cartopolis/src/systems/gui/theme.rs` — the only place UI colour lives * in this project — by `web_theme.rs` beside it, and a test fails when the two * disagree. It used to be copied by hand into the library's defaults, and the * copy stayed slate blue for a month after the client changed palette. * * So nothing here names a colour: every rule, here and in the page stylesheets, * uses the `--m-*` tokens (and `--c-brand`, `--c-glass`), which is what makes * light and dark work and what keeps the two halves of the product one look. */ /* The client's typeface, the client's own files (`assets/fonts`, copied by build.ts): Regular for body text, SemiBold for headings and the wordmark. */ @font-face { font-family: 'Plus Jakarta Sans'; font-weight: 400; font-display: swap; src: url('/fonts/PlusJakartaSans-Regular.ttf') format('truetype'); } @font-face { font-family: 'Plus Jakarta Sans'; font-weight: 600 700; font-display: swap; src: url('/fonts/PlusJakartaSans-SemiBold.ttf') format('truetype'); } body { letter-spacing: -0.003em; text-rendering: optimizeLegibility; } h1, h2, h3 { font-weight: 600; letter-spacing: -0.015em; margin: 0; } /* ── The client's chrome, on a page ────────────────────────────────────────── The client's state language: a selected row is a deep teal with light text (ACCENT_MUTED), not a solid slab, and the accent is for what is live. The glass and the depth — surfaces, buttons, fields — are `depth.css`. */ .m-nav-item { font-weight: 500; &[aria-current='page'] { color: var(--m-text-strong); & .m-nav-item__icon { color: var(--m-accent-text); opacity: 1; } } } .m-shell__header { & h1, & h2 { font-size: 1.15rem; } } .m-button { letter-spacing: 0; } /* The library's buttons never wrap, so on a phone a long label ran out of its button and off the screen ("Another OpenID server (a community's own…"). There it wraps, and the button grows a line instead. */ @media (max-width: 600px) { .m-button { line-height: 1.25; padding-block: 6px; white-space: normal; } } /* Fields are controls: their edge is the 3:1 line, as LINE is in the client. */ .m-input, .m-select { border-color: var(--m-border-strong); } /* iOS zooms the page into any field under 16px when it takes focus, and does not zoom back out: on a touch screen every field is at least that. */ @media (pointer: coarse) { input:not([type='checkbox'], [type='radio'], [type='range']), select, textarea { font-size: max(16px, 1em); } } .m-badge, .m-tag { border-radius: var(--m-radius-full); } /* ── Frames ──────────────────────────────────────────────────────────────── */ .wordmark { color: var(--m-text-strong); font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; & b { color: var(--c-brand); font-weight: 600; } } /* The mark comes in two files, one per theme (`tools/brand-mark.ts`), and a page carries both and shows one. The theme is the switch's choice when there is one (`html[data-theme]`) and the system's otherwise, the same rule `light-dark()` follows for every token. */ .mark-light { display: none; } @media (prefers-color-scheme: light) { html:not([data-theme='dark']) .mark-dark { display: none; } html:not([data-theme='dark']) .mark-light { display: block; } } html[data-theme='light'] .mark-dark { display: none; } html[data-theme='light'] .mark-light { display: block; } /* The admin frame is a Shell, and the Shell is the whole viewport. */ .m-shell.admin { height: 100dvh; } .admin-page { max-width: 64rem; } .nav-account { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: var(--m-space-2); padding-block: var(--m-space-2); & .who { flex: 1; /* Room for a short name before the row wraps; at 0 the name was the thing that gave way, down to its first letter. */ min-width: 5rem; overflow: hidden; color: var(--m-text-dim); font-size: var(--m-font-size-sm); text-overflow: ellipsis; white-space: nowrap; } } .page-frame { display: flex; flex-direction: column; min-height: 100dvh; } .page-header { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: var(--m-space-3); padding: var(--m-space-2) var(--m-space-4); border-bottom: 1px solid var(--m-border); & .spacer { flex: 1; } } .page-body { flex: 1; width: 100%; max-width: 60rem; margin: 0 auto; padding: var(--m-space-5) var(--m-space-4) 60px; &.is-wide { max-width: none; } } /* ── Shared ──────────────────────────────────────────────────────────────── */ /* A sentence of explanation under a control or a heading. */ .hint { margin: var(--m-space-1) 0 0; color: var(--m-text-dim); font-size: var(--m-font-size-sm); } /* What a list says when it has nothing in it. */ .empty { padding: var(--m-space-6) var(--m-space-4); border: 1px dashed var(--m-border); border-radius: var(--m-radius); color: var(--m-text-dim); text-align: center; } /* A page with one sentence on it: "Checking your session…". */ .splash { padding: 20vh 0; color: var(--m-text-dim); text-align: center; }