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:
@@ -120,9 +120,20 @@
|
||||
color: var(--on-jade);
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
input[type="number"],
|
||||
input[type="search"],
|
||||
/* Match every text-entry control, however it was declared.
|
||||
|
||||
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,
|
||||
textarea {
|
||||
padding: 8px 11px;
|
||||
@@ -131,6 +142,11 @@ textarea {
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
::placeholder {
|
||||
color: var(--ink3);
|
||||
opacity: 1; /* Firefox dims placeholders by default. */
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,12 @@
|
||||
ways. Only the tokens are redefined — never a colour's only definition. */
|
||||
|
||||
: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;
|
||||
--paper: #ffffff;
|
||||
--sunk: #e7ece7;
|
||||
@@ -63,6 +69,8 @@
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root:not([data-theme="light"]) {
|
||||
color-scheme: dark;
|
||||
|
||||
--bg: #0d1412;
|
||||
--paper: #151f1c;
|
||||
--sunk: #1c2723;
|
||||
@@ -106,6 +114,8 @@
|
||||
}
|
||||
|
||||
:root[data-theme="dark"] {
|
||||
color-scheme: dark;
|
||||
|
||||
--bg: #0d1412;
|
||||
--paper: #151f1c;
|
||||
--sunk: #1c2723;
|
||||
|
||||
@@ -61,6 +61,10 @@
|
||||
background: var(--line);
|
||||
border: 1px solid var(--line);
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user