Fix white native form fields on classic edit screens (v2.7.1)

Native form fields (title inputs, textareas, selects) on screens that
don't use the block editor — most visibly Edit Media's title field —
were showing stark white, breaking the dark theme. WP core styles some
fields via a 2-ID selector (#titlediv #title { background: #fff }),
which beats native-dark.css's existing form-field rule regardless of
class count, same specificity trap as an earlier block-editor
background bug. Added !important to the whole form-field rule block —
safe everywhere, no legitimate case for a native admin field to stay
white.

Verified this one rule fixes Edit Media, Edit Post (classic fields),
and Comment edit simultaneously; Add User was already clean. The
WYSIWYG editor body staying white is a separate, deliberate decision
(matches the block editor's own canvas) and wasn't touched.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
nixpanel
2026-07-05 07:12:38 -05:00
co-authored by Claude Sonnet 5
parent 15d6060ae3
commit fdd252cfe2
5 changed files with 48 additions and 7 deletions
+11 -3
View File
@@ -104,6 +104,14 @@ html.aurora-dark.aurora-ready #wpbody-content .row-actions {
}
/* Form fields ----------------------------------------------------------- */
/* !important: some native screens style specific fields via a 2-ID
selector (e.g. core's `#titlediv #title { background: #fff }` on the
classic/attachment edit screen's title field) — that beats this rule's
single #wpbody-content id no matter how many classes we stack on it,
same specificity trap as the earlier block-editor-page background bug.
There's no legitimate case where a native admin form field should stay
white, so forcing it here is safe across every screen, not just the
one that surfaced it. */
html.aurora-dark.aurora-ready #wpbody-content input[type='text'],
html.aurora-dark.aurora-ready #wpbody-content input[type='search'],
html.aurora-dark.aurora-ready #wpbody-content input[type='email'],
@@ -114,9 +122,9 @@ html.aurora-dark.aurora-ready #wpbody-content input[type='tel'],
html.aurora-dark.aurora-ready #wpbody-content input[type='date'],
html.aurora-dark.aurora-ready #wpbody-content textarea,
html.aurora-dark.aurora-ready #wpbody-content select {
background: var(--aurora-bg-subtle);
border-color: var(--aurora-border);
color: var(--aurora-text);
background: var(--aurora-bg-subtle) !important;
border-color: var(--aurora-border) !important;
color: var(--aurora-text) !important;
}
html.aurora-dark.aurora-ready #wpbody-content input::placeholder,