Repository navigation
Keep author span rules off Core navigation label wrappers - #3425
Merged
Merged
Conversation
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.
Fixes #3422.
Root cause
A source rule such as
.nav > li > a span { font:10px; display:block }is written for the subtitle span inside a link. Core navigation wraps each link's whole text in its own<span class="wp-block-navigation-item__label">, so onceais projected, the authorspanalso matched that wrapper. The entire label then rendered at 10px as a block. The projection happens on two paths, and both lacked the guard:WordPressCompatCssnavigation mapping (a→.wp-block-navigation-item__content), which real imports use.Fix
Both paths now emit
span:not(:where(.wp-block-navigation-item__label)). This adds no specificity, real source spans stay matched, and only the engine-owned wrapper is excluded.Evidence
tests/unit/navigation-label-wrapper-author-span.phpcovers the HtmlTransformer cascade (including a dormant rule) and the ArtifactCompiler site compile. Both fail on trunk.composer test:unitis green.studio create --from <reduced site> --static-site-importer-path <SSI dev zip with this branch>, Chromium at 1200px:The first commit (the projector path) passed its own unit test, but the real import was unchanged. Measuring in the browser located the second path; this is why the test now also covers the site compile.
AI disclosure: the fix was drafted by a Homeboy cook (Pi coding agent, roadie/cook-heavy: gpt-6.1-sol). Homeboy marked the green candidate
candidate_recoverable(Extra-Chill/homeboy#16418), so it was promoted to this branch withhomeboy agent-task promote. Claude (Anthropic), running in Pi, then reviewed it, re-ran verification and paired-build evidence, and pushed it.