/* SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors */ /* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial */ /* --------------------------------------------------------------------------- * @mailwoman/react — component styles. * * Plain, `mw-`-prefixed classes. Every color, family and radius here names a * token from `tokens.css`: a Sister Software role (`--ss-color-content`, * `--ss-spacing-3`) or a Mailwoman token (`--mw-color-confidence-high`). A host * loads `@mailwoman/react/tokens.css`, and `fonts.css` beside it for the faces. * There are no inline fallbacks, on purpose: a fallback is what let eight * undefined names paint Infima's LIGHT values inside a dark app without * anything failing. A token that is missing should look missing. * * A rule may read roles only. Reaching a palette color (`--ss-color-mint`, * `--ss-figure-*`) from here skips the layer that says what a value is FOR, and * a palette color does not follow the dark theme. * * No CSS module hashing — the class names are stable and namespaced, and no * component imports this file, so the bare package import stays node-safe. * --------------------------------------------------------------------------- */ /* * The layer order every consumer inherits. Naming the order here means a host's own rules can win by declaring a * later layer rather than by out-specifying ours, which is what keeps this package embeddable in Docusaurus without * either side fighting the other's selectors. */ @layer reset, tokens, base, components, utilities, overrides; /* * The vocabulary these rules read, pulled in rather than left to the host to remember. A consumer that loaded the * components and forgot the tokens is exactly the state that shipped: rules reading names nothing defined. */ @import url("./tokens/index.css") layer(tokens); /* The docs search modal keeps its rules beside its component. */ @import url("./lib/search/search.css") layer(components); @layer reset { /* * Every box is measured by its border. The default is `content-box`, where `width`, `height` and `max-height` * describe the content ALONE and any padding and border stand outside them — so a sheet capped at 52% of the * viewport shipped 34px taller than its cap and ran off the bottom of the screen, and every rule that pairs a size * with padding is one edit away from the same defect. * * A rule that wants the other measure states `box-sizing: content-box` for itself; the footer strip does, because * its height names one line of type and its safe-area padding has to sit outside that. * * It is in the `reset` layer, so a host's own rules and every layer below win over it without out-specifying it. */ *, *::before, *::after { box-sizing: border-box; } } @layer base { /* * The theme attribute has to reach the USER AGENT, not only our own rules. `color-scheme` is what paints a * scrollbar, a focus ring, a `