F1: Saddle_Lint_Style_Accessor companion interface + Gutenberg impl - #28
Merged
Conversation
Closed-loop foundation (#23): the deeper quality rules need design facts the base lint accessor doesn't expose, and adding methods to Saddle_Lint_Accessor would fatal any older Pro accessor against a newer free. So the new facts live on an ADDITIVE companion interface; rules feature-detect with instanceof and skip silently when an accessor hasn't caught up. - interface-saddle-lint-style-accessor.php: border_radius, gap, font_size, image_alt, heading_level, global_preset_ref, variable_refs, design_brief, and the computed_style seam the render pillar fills later. Same contract as the base interface: resolve what you can, return null over guessing. - Gutenberg accessor implements it: corner radii serialized clockwise for identity comparison, blockGap axes joined, font-size preset slugs resolved through theme.json (mirrors the palette resolver), core/image alt read off the saved <img> (covers stay decorative -> null), var(--...) plus internal var:preset|...| refs collected and normalized. - tests/style-accessor-test.php (19 tests): every getter both ways (populated + null), plus the versioning guarantee the split exists for - a base-only legacy accessor runs through Saddle_Lint::run() with zero fatals. Full suite 263 green; phpcs clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 10, 2026
ifahimreza
added a commit
that referenced
this pull request
Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #23 — the closed-loop foundation (epic #22, build step F1). Unblocks F2/F4/F5 and Pro P1/P2.
What
The deeper quality rules need design facts the base lint accessor doesn't expose. Adding methods to
Saddle_Lint_Accessorwould fatal older Pro accessors against a newer free, so the new facts live on an additive companion interface — rules feature-detect withinstanceofand skip silently when an accessor hasn't caught up.interface-saddle-lint-style-accessor.php:border_radius,gap,font_size,image_alt,heading_level,global_preset_ref,variable_refs,design_brief, + thecomputed_styleseam the render pillar fills later. Base contract carries over: resolve what you can, null over guessing.core/imagealt read off the saved<img>(covers stay decorative → null),var(--…)+ internalvar:preset|…refs normalized.Tests
tests/style-accessor-test.php— 19 tests: every getter both ways (populated + null), plus the versioning guarantee the split exists for: a base-only legacy accessor runs throughSaddle_Lint::run()with zero fatals.Full suite 263 green (+19); phpcs clean. (CI PHPUnit red is the pre-existing no-WP-core runner issue.)
🤖 Generated with Claude Code