fix(ui): white input boxes on a dark page, and a slab of line colour

The text-entry rule was an allowlist of type= values, which fails twice.
An <input> with no type attribute is a text field but matches no
[type=...] selector at all, and any type nobody listed falls through
silently. Both had happened: the add-a-word fields carry no type, and the
server URL and token are url and password. All four rendered as white UA
boxes on a dark page.

A denylist of the controls that must keep native rendering — checkbox,
radio, range, colour, file, the button-like ones — cannot rot the same way.

color-scheme now sits on :root per theme rather than nowhere. It is what
tells the browser to paint the parts CSS cannot reach: the select dropdown
list, spinner arrows, scrollbars, the autofill wash.

Separately, .tiles draws its hairlines with its own background, so as a
stretched grid item it filled the rest of the hero's height with a solid
block of line colour. align-self: start.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
MechaCat02
2026-09-08 21:05:54 +02:00
parent 7275e156df
commit 7f2762aeb8
3 changed files with 33 additions and 3 deletions

View File

@@ -120,9 +120,20 @@
color: var(--on-jade); color: var(--on-jade);
} }
input[type="text"], /* Match every text-entry control, however it was declared.
input[type="number"],
input[type="search"], This was an allowlist of type= values, which fails twice over: an
`<input>` with no type attribute is a text field but matches no
[type=...] selector at all, and any type nobody thought of (url,
password, email) silently falls through. Both happened — the add-a-word
fields and the server URL and token rendered as white UA boxes on a dark
page. A denylist of the controls that must keep their native rendering
is the shape that cannot rot. */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(
[type="color"]
):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="image"]):not(
[type="reset"]
),
select, select,
textarea { textarea {
padding: 8px 11px; padding: 8px 11px;
@@ -131,6 +142,11 @@ textarea {
color: var(--ink); color: var(--ink);
} }
::placeholder {
color: var(--ink3);
opacity: 1; /* Firefox dims placeholders by default. */
}
textarea { textarea {
resize: vertical; resize: vertical;
} }

View File

@@ -11,6 +11,12 @@
ways. Only the tokens are redefined — never a colour's only definition. */ ways. Only the tokens are redefined — never a colour's only definition. */
:root { :root {
/* Tells the UA which palette to paint the parts CSS cannot reach: the
select dropdown list, spinner arrows, scrollbars, the autofill wash
and the canvas behind the page. Without it those stay light while
everything around them is dark. */
color-scheme: light;
--bg: #f1f4f1; --bg: #f1f4f1;
--paper: #ffffff; --paper: #ffffff;
--sunk: #e7ece7; --sunk: #e7ece7;
@@ -63,6 +69,8 @@
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) { :root:not([data-theme="light"]) {
color-scheme: dark;
--bg: #0d1412; --bg: #0d1412;
--paper: #151f1c; --paper: #151f1c;
--sunk: #1c2723; --sunk: #1c2723;
@@ -106,6 +114,8 @@
} }
:root[data-theme="dark"] { :root[data-theme="dark"] {
color-scheme: dark;
--bg: #0d1412; --bg: #0d1412;
--paper: #151f1c; --paper: #151f1c;
--sunk: #1c2723; --sunk: #1c2723;

View File

@@ -61,6 +61,10 @@
background: var(--line); background: var(--line);
border: 1px solid var(--line); border: 1px solid var(--line);
align-content: start; align-content: start;
/* The background IS the hairline between tiles, so the box must not be
taller than its rows: as a stretched grid item it filled the rest of
the hero's height with a solid slab of line colour. */
align-self: start;
} }
.tile { .tile {