From 6dc4de6b8e7f423ba6638c71b3ad3a1622db0112 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Fri, 14 Aug 2026 10:21:23 -0500 Subject: [PATCH] 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) --- assets/css/base.css | 2 +- assets/css/layout.css | 4 +- blocks/featured-stories/block.json | 2 +- blocks/footer-content/block.json | 2 +- blocks/header-tools/block.json | 2 +- blocks/journal-link/block.json | 2 +- blocks/journal-stream/block.json | 2 +- blocks/latest-podcast/block.json | 2 +- blocks/mobile-menu-toggle/block.json | 2 +- blocks/podcast-meta/block.json | 2 +- blocks/reading-time/block.json | 2 +- blocks/related-posts/block.json | 2 +- blocks/related-posts/style.css | 2 +- blocks/release-detail/block.json | 2 +- blocks/release-list/block.json | 2 +- blocks/selected-work/block.json | 2 +- blocks/show-links/block.json | 2 +- blocks/site-brand/block.json | 2 +- blocks/subscribe-cta/block.json | 2 +- blocks/subscribe-form/block.json | 2 +- blocks/theme-toggle/block.json | 2 +- blocks/topic-hero/block.json | 2 +- blocks/track-meta/block.json | 2 +- functions.php | 2 +- style.css | 2 +- tests/smoke/theme-contract.test.mjs | 18 +- theme.json | 423 +++++++++++++++++---------- 27 files changed, 308 insertions(+), 185 deletions(-) diff --git a/assets/css/base.css b/assets/css/base.css index c94b189..74aeb4b 100644 --- a/assets/css/base.css +++ b/assets/css/base.css @@ -17,7 +17,7 @@ html { body { margin: 0; background: var(--wp--preset--color--night); - color: var(--wp--preset--color--text); + color: var(--wp--preset--color--foreground); overflow-wrap: break-word; } diff --git a/assets/css/layout.css b/assets/css/layout.css index 2022523..32f1503 100644 --- a/assets/css/layout.css +++ b/assets/css/layout.css @@ -126,7 +126,7 @@ html[data-theme="light"] header.wp-block-template-part { .chrnx-theme-control > [data-chrnx-theme-button]:hover, .chrnx-theme-control > [data-chrnx-theme-button][aria-expanded="true"] { background: color-mix(in srgb, var(--wp--preset--color--green) 24%, transparent); - color: var(--wp--preset--color--text); + color: var(--wp--preset--color--foreground); opacity: 1; } @@ -260,7 +260,7 @@ html[data-theme="light"] .chrnx-theme-control > [data-chrnx-theme-button][aria-e /* Quiet chip, full-contrast label: accent-on-accent fails WCAG AA. */ .chrnx-theme-toggle [data-chrnx-theme-value][aria-pressed="true"] { background: color-mix(in srgb, var(--wp--preset--color--green) 24%, transparent); - color: var(--wp--preset--color--text); + color: var(--wp--preset--color--foreground); opacity: 1; } diff --git a/blocks/featured-stories/block.json b/blocks/featured-stories/block.json index 934fcfe..e189c95 100644 --- a/blocks/featured-stories/block.json +++ b/blocks/featured-stories/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "chrnx/featured-stories", - "version": "0.4.2", + "version": "0.4.3", "title": "Featured Stories", "category": "theme", "description": "A sticky-led selection of topic-diverse stories.", diff --git a/blocks/footer-content/block.json b/blocks/footer-content/block.json index ba3323a..613b519 100644 --- a/blocks/footer-content/block.json +++ b/blocks/footer-content/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "chrnx/footer-content", - "version": "0.4.2", + "version": "0.4.3", "title": "CHRNX Footer Content", "category": "theme", "description": "Display translated internal footer navigation and site credit.", diff --git a/blocks/header-tools/block.json b/blocks/header-tools/block.json index 6403350..975e12f 100644 --- a/blocks/header-tools/block.json +++ b/blocks/header-tools/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "chrnx/header-tools", - "version": "0.4.2", + "version": "0.4.3", "title": "CHRNX Header Tools", "category": "theme", "description": "Display translated primary navigation and progressive site search.", diff --git a/blocks/journal-link/block.json b/blocks/journal-link/block.json index 407960e..38f2c51 100644 --- a/blocks/journal-link/block.json +++ b/blocks/journal-link/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "chrnx/journal-link", - "version": "0.4.2", + "version": "0.4.3", "title": "Journal Link", "category": "theme", "description": "Display a translated portable link to the full Journal.", diff --git a/blocks/journal-stream/block.json b/blocks/journal-stream/block.json index 6ac7d57..b3f6436 100644 --- a/blocks/journal-stream/block.json +++ b/blocks/journal-stream/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "chrnx/journal-stream", - "version": "0.4.2", + "version": "0.4.3", "title": "Journal Stream", "category": "theme", "description": "The filterable chronological journal.", diff --git a/blocks/latest-podcast/block.json b/blocks/latest-podcast/block.json index 13b2957..f46aa8d 100644 --- a/blocks/latest-podcast/block.json +++ b/blocks/latest-podcast/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "chrnx/latest-podcast", - "version": "0.4.2", + "version": "0.4.3", "title": "Latest Podcast", "category": "theme", "description": "A linked card for the latest podcast episode.", diff --git a/blocks/mobile-menu-toggle/block.json b/blocks/mobile-menu-toggle/block.json index 5c6877d..72f5b8e 100644 --- a/blocks/mobile-menu-toggle/block.json +++ b/blocks/mobile-menu-toggle/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "chrnx/mobile-menu-toggle", - "version": "0.4.2", + "version": "0.4.3", "title": "CHRNX Mobile Menu Toggle", "category": "theme", "description": "Progressively reveal the primary navigation on small screens.", diff --git a/blocks/podcast-meta/block.json b/blocks/podcast-meta/block.json index 23a93d3..2149421 100644 --- a/blocks/podcast-meta/block.json +++ b/blocks/podcast-meta/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "chrnx/podcast-meta", - "version": "0.4.2", + "version": "0.4.3", "title": "Podcast Metadata", "category": "theme", "description": "Safe episode details for the current post.", diff --git a/blocks/reading-time/block.json b/blocks/reading-time/block.json index 95afb13..87bc07b 100644 --- a/blocks/reading-time/block.json +++ b/blocks/reading-time/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "chrnx/reading-time", - "version": "0.4.2", + "version": "0.4.3", "title": "Reading Time", "category": "theme", "description": "Display a localized estimate based on the current post content.", diff --git a/blocks/related-posts/block.json b/blocks/related-posts/block.json index 473e559..b3ed913 100644 --- a/blocks/related-posts/block.json +++ b/blocks/related-posts/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "chrnx/related-posts", - "version": "0.4.2", + "version": "0.4.3", "title": "Related Posts", "category": "theme", "description": "Related stories selected by topic, tags, and recency.", diff --git a/blocks/related-posts/style.css b/blocks/related-posts/style.css index ac606af..2636c6a 100644 --- a/blocks/related-posts/style.css +++ b/blocks/related-posts/style.css @@ -2,7 +2,7 @@ --chrnx-related-gap: var(--wp--preset--spacing--40, 1.5rem); --chrnx-related-control-background: var(--wp--preset--color--panel); --chrnx-related-control-border: var(--wp--preset--color--muted); - --chrnx-related-control-text: var(--wp--preset--color--text); + --chrnx-related-control-text: var(--wp--preset--color--foreground); --chrnx-related-focus-ring: var(--wp--preset--color--green); max-width: 100%; diff --git a/blocks/release-detail/block.json b/blocks/release-detail/block.json index 3d51ea9..02afd90 100644 --- a/blocks/release-detail/block.json +++ b/blocks/release-detail/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "chrnx/release-detail", - "version": "0.4.2", + "version": "0.4.3", "title": "Release Detail", "category": "theme", "description": "Album cover, listening links, and the ordered tracklist.", diff --git a/blocks/release-list/block.json b/blocks/release-list/block.json index d953356..d356bab 100644 --- a/blocks/release-list/block.json +++ b/blocks/release-list/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "chrnx/release-list", - "version": "0.4.2", + "version": "0.4.3", "title": "Release List", "category": "theme", "description": "The No Names releases, each linking to its album page.", diff --git a/blocks/selected-work/block.json b/blocks/selected-work/block.json index c56a179..f76b64d 100644 --- a/blocks/selected-work/block.json +++ b/blocks/selected-work/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "chrnx/selected-work", - "version": "0.4.2", + "version": "0.4.3", "title": "Selected Work", "category": "theme", "description": "Hand-picked projects first, then the most recent ones.", diff --git a/blocks/show-links/block.json b/blocks/show-links/block.json index 0682d02..87e1d05 100644 --- a/blocks/show-links/block.json +++ b/blocks/show-links/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "chrnx/show-links", - "version": "0.4.2", + "version": "0.4.3", "title": "Show Links", "category": "theme", "description": "Where a podcast show can be listened to, rendered only when a URL exists.", diff --git a/blocks/site-brand/block.json b/blocks/site-brand/block.json index 2bc5b10..26b6a5e 100644 --- a/blocks/site-brand/block.json +++ b/blocks/site-brand/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "chrnx/site-brand", - "version": "0.4.2", + "version": "0.4.3", "title": "CHRNX Site Brand", "category": "theme", "description": "Display the local CHRNX wordmark linked to the site home.", diff --git a/blocks/subscribe-cta/block.json b/blocks/subscribe-cta/block.json index 11499a4..3255227 100644 --- a/blocks/subscribe-cta/block.json +++ b/blocks/subscribe-cta/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "chrnx/subscribe-cta", - "version": "0.4.2", + "version": "0.4.3", "title": "Subscribe CTA", "category": "theme", "description": "A call to action linked to the configured subscribe page.", diff --git a/blocks/subscribe-form/block.json b/blocks/subscribe-form/block.json index 1dc9eb8..e86f467 100644 --- a/blocks/subscribe-form/block.json +++ b/blocks/subscribe-form/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "chrnx/subscribe-form", - "version": "0.4.2", + "version": "0.4.3", "title": "Subscribe Form", "category": "theme", "description": "The email subscription form, rendered only when a provider endpoint is configured.", diff --git a/blocks/theme-toggle/block.json b/blocks/theme-toggle/block.json index 711b014..1228f2d 100644 --- a/blocks/theme-toggle/block.json +++ b/blocks/theme-toggle/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "chrnx/theme-toggle", - "version": "0.4.2", + "version": "0.4.3", "title": "Theme Toggle", "category": "theme", "description": "Choose a light, dark, or system color theme.", diff --git a/blocks/topic-hero/block.json b/blocks/topic-hero/block.json index 4d16548..067fe1d 100644 --- a/blocks/topic-hero/block.json +++ b/blocks/topic-hero/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "chrnx/topic-hero", - "version": "0.4.2", + "version": "0.4.3", "title": "Topic Hero", "category": "theme", "description": "A fixed-art hero for an editorial topic.", diff --git a/blocks/track-meta/block.json b/blocks/track-meta/block.json index b1599e2..1a843b3 100644 --- a/blocks/track-meta/block.json +++ b/blocks/track-meta/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "chrnx/track-meta", - "version": "0.4.2", + "version": "0.4.3", "title": "Track Meta", "category": "theme", "description": "Player, listening links, and album for one song.", diff --git a/functions.php b/functions.php index ce5b5bd..7c977d8 100644 --- a/functions.php +++ b/functions.php @@ -1,5 +1,5 @@ { + const theme = JSON.parse(await readProjectFile('theme.json')); + /* + * WordPress emits `.has--color { color: ... !important }` for every + * palette entry. The editor adds the class `has-text-color` to any block + * carrying a custom text colour, so a slug named "text" produced a rule + * that overrode every custom colour on the site with the preset value. + */ + const reserved = new Set(['text', 'background', 'link']); + const collisions = theme.settings.color.palette + .map(({ slug }) => slug) + .filter((slug) => reserved.has(slug)); + + assert.deepEqual(collisions, []); +}); + test('the local Zen Maru Gothic files and license are present', async () => { await Promise.all([ 'assets/fonts/zen-maru-gothic-latin-500.woff2', diff --git a/theme.json b/theme.json index 78e7ffe..f45888b 100644 --- a/theme.json +++ b/theme.json @@ -1,160 +1,267 @@ { - "$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": "text", "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|text" - }, - "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|text" - }, - "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" - } - } - } - } + "$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" + } + } + } + } }