mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
Quiet fields: base.css field baseline, --field tokens, 3:1 border-strong, app-wide migration
This commit is contained in:
@@ -55,6 +55,49 @@ body {
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Field baseline (arch 09 §4) — the quiet field: a fill one step off its surface
|
||||
* plus a bottom border only, no box. The fill comes from the contextual --field
|
||||
* token (elevated surfaces set `--field: var(--field-02)` on their container,
|
||||
* the same mechanism as --control-hover-fill); the underline is --border-strong,
|
||||
* which meets 3:1 non-text contrast in both themes. Declared once here at zero
|
||||
* specificity (:where) so modules add only their idiosyncrasies — width, mono
|
||||
* font, padding — never a competing border recipe. Monaco's internal widgets
|
||||
* (find/replace inputs) keep their own styling and are excluded.
|
||||
*/
|
||||
:where(
|
||||
input:not([type]),
|
||||
input[type='text'],
|
||||
input[type='search'],
|
||||
input[type='number'],
|
||||
input[type='url'],
|
||||
textarea
|
||||
):where(:not(.monaco-editor *)) {
|
||||
font: inherit;
|
||||
color: var(--text);
|
||||
background: var(--field);
|
||||
border: none;
|
||||
border-block-end: var(--border-width) solid var(--border-strong);
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
:where(input, textarea)::placeholder {
|
||||
color: var(--text-placeholder);
|
||||
}
|
||||
|
||||
/* On a field the ring hugs the box — an offset ring reads as a second border
|
||||
where there is no longer a box to anchor it. */
|
||||
:where(
|
||||
input:not([type]),
|
||||
input[type='text'],
|
||||
input[type='search'],
|
||||
input[type='number'],
|
||||
input[type='url'],
|
||||
textarea
|
||||
):where(:not(.monaco-editor *)):focus-visible {
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*,
|
||||
*::before,
|
||||
|
||||
Reference in New Issue
Block a user