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>
268 lines
6.2 KiB
JSON
268 lines
6.2 KiB
JSON
{
|
|
"$schema": "https://schemas.wp.org/wp/6.9/theme.json",
|
|
"version": 3,
|
|
"settings": {
|
|
"appearanceTools": true,
|
|
"color": {
|
|
"defaultPalette": false,
|
|
"palette": [
|
|
{
|
|
"slug": "night",
|
|
"color": "#0D1117",
|
|
"name": "Night"
|
|
},
|
|
{
|
|
"slug": "panel",
|
|
"color": "#161B22",
|
|
"name": "Panel"
|
|
},
|
|
{
|
|
"slug": "violet",
|
|
"color": "#7C6CF0",
|
|
"name": "Violet"
|
|
},
|
|
{
|
|
"slug": "green",
|
|
"color": "#5FB88A",
|
|
"name": "Green"
|
|
},
|
|
{
|
|
"slug": "foreground",
|
|
"color": "#E6EDF3",
|
|
"name": "Text"
|
|
},
|
|
{
|
|
"slug": "muted",
|
|
"color": "#8B949E",
|
|
"name": "Muted"
|
|
},
|
|
{
|
|
"slug": "paper",
|
|
"color": "#F6F2E9",
|
|
"name": "Paper"
|
|
},
|
|
{
|
|
"slug": "surface",
|
|
"color": "#FFFDF7",
|
|
"name": "Surface"
|
|
},
|
|
{
|
|
"slug": "ink",
|
|
"color": "#25221F",
|
|
"name": "Ink"
|
|
},
|
|
{
|
|
"slug": "light-muted",
|
|
"color": "#625C54",
|
|
"name": "Light Muted"
|
|
},
|
|
{
|
|
"slug": "light-violet",
|
|
"color": "#674CA4",
|
|
"name": "Light Violet"
|
|
},
|
|
{
|
|
"slug": "light-green",
|
|
"color": "#327854",
|
|
"name": "Light Green"
|
|
},
|
|
{
|
|
"slug": "border",
|
|
"color": "#DED6C7",
|
|
"name": "Border"
|
|
}
|
|
]
|
|
},
|
|
"layout": {
|
|
"contentSize": "720px",
|
|
"wideSize": "1120px"
|
|
},
|
|
"spacing": {
|
|
"defaultSpacingSizes": false,
|
|
"spacingSizes": [
|
|
{
|
|
"slug": "20",
|
|
"size": "clamp(0.5rem, 0.4rem + 0.4vw, 0.75rem)",
|
|
"name": "2XS"
|
|
},
|
|
{
|
|
"slug": "30",
|
|
"size": "clamp(0.75rem, 0.6rem + 0.6vw, 1rem)",
|
|
"name": "XS"
|
|
},
|
|
{
|
|
"slug": "40",
|
|
"size": "clamp(1rem, 0.8rem + 0.8vw, 1.5rem)",
|
|
"name": "Small"
|
|
},
|
|
{
|
|
"slug": "50",
|
|
"size": "clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem)",
|
|
"name": "Medium"
|
|
},
|
|
{
|
|
"slug": "60",
|
|
"size": "clamp(2.25rem, 1.6rem + 2vw, 3.5rem)",
|
|
"name": "Large"
|
|
},
|
|
{
|
|
"slug": "70",
|
|
"size": "clamp(3rem, 2rem + 3vw, 5rem)",
|
|
"name": "XL"
|
|
}
|
|
],
|
|
"units": [
|
|
"px",
|
|
"rem",
|
|
"em",
|
|
"%",
|
|
"vw",
|
|
"vh"
|
|
]
|
|
},
|
|
"typography": {
|
|
"defaultFontSizes": false,
|
|
"fluid": true,
|
|
"fontFamilies": [
|
|
{
|
|
"slug": "body",
|
|
"name": "System UI",
|
|
"fontFamily": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif"
|
|
},
|
|
{
|
|
"slug": "heading",
|
|
"name": "Zen Maru Gothic",
|
|
"fontFamily": "\"Zen Maru Gothic\", sans-serif",
|
|
"fontFace": [
|
|
{
|
|
"fontFamily": "Zen Maru Gothic",
|
|
"fontStyle": "normal",
|
|
"fontWeight": "500",
|
|
"fontDisplay": "swap",
|
|
"src": [
|
|
"file:./assets/fonts/zen-maru-gothic-latin-500.woff2"
|
|
]
|
|
},
|
|
{
|
|
"fontFamily": "Zen Maru Gothic",
|
|
"fontStyle": "normal",
|
|
"fontWeight": "700",
|
|
"fontDisplay": "swap",
|
|
"src": [
|
|
"file:./assets/fonts/zen-maru-gothic-latin-700.woff2"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"slug": "metadata",
|
|
"name": "System Monospace",
|
|
"fontFamily": "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"
|
|
}
|
|
],
|
|
"fontSizes": [
|
|
{
|
|
"slug": "small",
|
|
"size": "clamp(0.8125rem, 0.78rem + 0.15vw, 0.875rem)",
|
|
"name": "Small"
|
|
},
|
|
{
|
|
"slug": "medium",
|
|
"size": "clamp(1rem, 0.95rem + 0.2vw, 1.125rem)",
|
|
"name": "Medium"
|
|
},
|
|
{
|
|
"slug": "large",
|
|
"size": "clamp(1.35rem, 1.15rem + 0.8vw, 1.75rem)",
|
|
"name": "Large"
|
|
},
|
|
{
|
|
"slug": "x-large",
|
|
"size": "clamp(1.75rem, 1.35rem + 1.6vw, 2.75rem)",
|
|
"name": "Extra Large"
|
|
},
|
|
{
|
|
"slug": "display",
|
|
"size": "clamp(2.5rem, 1.7rem + 3.2vw, 4.75rem)",
|
|
"name": "Display"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"styles": {
|
|
"color": {
|
|
"background": "var:preset|color|night",
|
|
"text": "var:preset|color|foreground"
|
|
},
|
|
"spacing": {
|
|
"blockGap": "var:preset|spacing|50"
|
|
},
|
|
"typography": {
|
|
"fontFamily": "var:preset|font-family|body",
|
|
"fontSize": "var:preset|font-size|medium",
|
|
"lineHeight": "1.65"
|
|
},
|
|
"elements": {
|
|
"button": {
|
|
"color": {
|
|
"background": "var:preset|color|green",
|
|
"text": "var:preset|color|night"
|
|
},
|
|
"typography": {
|
|
"fontWeight": "700"
|
|
}
|
|
},
|
|
"heading": {
|
|
"color": {
|
|
"text": "var:preset|color|foreground"
|
|
},
|
|
"typography": {
|
|
"fontFamily": "var:preset|font-family|heading",
|
|
"fontWeight": "700",
|
|
"lineHeight": "1.2"
|
|
}
|
|
},
|
|
"link": {
|
|
"color": {
|
|
"text": "var:preset|color|violet"
|
|
},
|
|
"typography": {
|
|
"textDecoration": "underline"
|
|
}
|
|
}
|
|
},
|
|
"blocks": {
|
|
"core/button": {
|
|
"border": {
|
|
"radius": "0.35rem"
|
|
}
|
|
},
|
|
"core/post-date": {
|
|
"color": {
|
|
"text": "var:preset|color|muted"
|
|
},
|
|
"typography": {
|
|
"fontFamily": "var:preset|font-family|metadata",
|
|
"fontSize": "var:preset|font-size|small"
|
|
}
|
|
},
|
|
"core/post-terms": {
|
|
"color": {
|
|
"text": "var:preset|color|muted"
|
|
},
|
|
"typography": {
|
|
"fontFamily": "var:preset|font-family|metadata",
|
|
"fontSize": "var:preset|font-size|small"
|
|
}
|
|
},
|
|
"core/quote": {
|
|
"border": {
|
|
"color": "var:preset|color|violet",
|
|
"style": "solid",
|
|
"width": "0 0 0 3px"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|