Files
chrnx-dev-wp/assets/css/base.css
T
chrnxandClaude Opus 5 6dc4de6b8e fix: stop the text palette slug from hijacking every custom colour
theme.json shipped a palette entry with the slug "text", so WordPress
generated `.has-text-color { color: var(--wp--preset--color--text)
!important }`. The block editor puts that same class on any block given a
custom text colour, so the rule overrode every one of them site-wide with
the dark-theme foreground, unreadable in either theme. An !important
declaration beats an inline style, which is why the colour set on the
block never had a chance.

Rename the slug to "foreground". No published content used the class, for
the obvious reason that it never worked, so nothing has to be migrated.
A smoke test now rejects any palette slug that shadows an editor utility
class.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:21:23 -05:00

72 lines
1.1 KiB
CSS

/*
* Local Zen Maru Gothic sources are registered once in theme.json with
* font-display: swap.
*/
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
color-scheme: dark;
--chrnx-focus-ring: var(--wp--preset--color--green);
}
body {
margin: 0;
background: var(--wp--preset--color--night);
color: var(--wp--preset--color--foreground);
overflow-wrap: break-word;
}
img,
svg,
video {
display: block;
max-width: 100%;
height: auto;
}
button,
input,
select,
textarea {
font: inherit;
}
a:hover {
color: var(--wp--preset--color--green);
}
:focus-visible {
border-radius: 0.4rem;
outline: 2px solid transparent;
outline-offset: 3px;
box-shadow: 0 0 0 3px var(--chrnx-focus-ring);
}
html[data-theme="light"] {
--chrnx-focus-ring: var(--wp--preset--color--light-green);
}
@media (prefers-color-scheme: light) {
:root:not([data-theme]) {
--chrnx-focus-ring: var(--wp--preset--color--light-green);
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
scroll-behavior: auto !important;
transition-duration: 0.01ms !important;
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
}
}