You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
7
+
## [2.2.1] - 2026-05-12
8
+
9
+
### Added
10
+
11
+
-**`border-color-raw-slug` rule** (`BaseRules`) — detects raw color slugs in `"border"` style objects (e.g. `"color":"border-light"`) that must be `"color":"var:preset|color|{slug}"`. A bare slug causes WordPress to emit `border-color:border-light` instead of the CSS variable, producing a `core/group` block validation mismatch in the site editor.
// Matches "border":{..."color":"some-slug"...} where the value is not a var:preset reference.
271
+
// Raw slugs (e.g. "color":"border-light") cause WordPress to emit border-color:border-light
272
+
// instead of border-color:var(--wp--preset--color--border-light), producing a block validation mismatch.
273
+
if (preg_match('/"border"\s*:\s*\{[^}]*"color"\s*:\s*"(?!var:preset\|color\|)[a-z][a-z0-9-]*"/', $content, $matches)) {
274
+
return [$this->violation('border-color-raw-slug', 'Raw color slug found in "border" object — use "color":"var:preset|color|{slug}" instead of a bare slug (e.g. "color":"border-light" → "color":"var:preset|color|border-light"). A raw slug causes WordPress to emit border-color:{slug} rather than the CSS variable, producing a block validation mismatch.')];
0 commit comments