Merged nav+ul core/navigation root takes the list's width:100% over the source nav's width
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 64/100
Research direction
Start by locating the transformer that merges the source cnave and cule into a ccore/navigatione root, then find the existing transformer tests. Reproduce the reduced page and inspect how its nav and list width rules are projected onto the merged root. Done means a test shows a 424px root beside the logo and item widths matching the source within 1px.
Written by the indexing model from the issue text.
Description
Finding
When a source <nav> and its <ul> merge into one core/navigation root, the list's author classes are copied onto that root. A list rule such as .menu{width:100%} then competes with the source nav's own nav{width:424px} on the same element, and wins on specificity. The navigation fills its whole flex parent, wraps below the logo, and every flex:1 1 auto item stretches.
This came from a Wix site import: the desktop header grew from 77px to 149px in the reduced case, and from 131px to 255px on the real site (with #5422).
Reduced page
<!doctype html><html><head><meta charset="utf-8"><title>index</title><style>
body{margin:0;font:15px sans-serif;background:#f4f3ef}
header{display:flex;align-items:center;gap:40px;padding:20px 280px}
.logo{font-size:28px;color:#555}
nav{display:flex;width:424px}
.menu{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none;width:100%}
.item{flex:1 1 auto}
.link{flex:1;display:block;text-decoration:none;color:#333;padding:10px 8px;text-align:center}
.link.current{background:#e0dfdb}
</style></head><body>
<header><div class="logo">travelism</div><nav aria-label="Site"><ul class="menu">
<li class="item"><div><a class="link current" href="index.html">Home</a></div></li>
<li class="item"><div><a class="link" href="a.html">About</a></div></li>
<li class="item"><div><a class="link" href="b.html">Reiseziele</a></div></li>
<li class="item"><div><a class="link" href="c.html">Wanderful</a></div></li>
</ul></nav></header>
<main><p>Page text.</p></main>
</body></html>
| source | imported (SSI 1.33.512 / BE 0.45.448) | |
|---|---|---|
| nav width | 424 (nav) |
880 (nav.wp-block-navigation.menu) |
| nav top | 20 (beside logo) | 92 (wrapped below logo) |
| "Home" item | 87×37 | 201×37 |
| header height | 77 | 149 |
Width rules that match the generated <nav class="wp-block-navigation … blocks-engine-list-navigation menu">:
:where(.blocks-engine-source-nav-…-0):not(be-t-0) { width:424px } /* source nav, specificity 0,0,1 */
.menu { width:100% } /* source ul, specificity 0,1,0, now on the same element */
Expected
The merged root renders at the source nav's width (424px here), and the items match their source widths. A list rule should only win where it also won in the source. One way to get there: project the list's box declarations onto the root only where the source nav did not size that axis. Another: give the merged root the list's rule under a selector that cannot outrank the nav's projection.
Related: #4945 (the responsive root inheriting the list's classes; closed) and #1482.
Acceptance
- In the reduced page, the core/navigation root is 424px wide and sits beside the logo, and each item width matches its source width ±1px.
- A test covers the transformer output for the reduced page.
AI disclosure: found and reduced by Claude (Pi via Roadie) during a Data Liberation import loop on a Wix site; reviewed by @chubes4.
- Dominant language
- PHP
- Stars
- 28
- Forks
- 5
- Avg merge
- 2h 59m
- Merged PRs (30d)
- 942
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Automattic/blocks-engine
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Automattic/blocks-engine#6318 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Automattic/blocks-engine#4943 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Automattic/blocks-engine#4942 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Automattic/blocks-engine#4921 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Automattic/blocks-engine#775 ·
Maintainers usually reply within 1 day
All issues in Automattic/blocks-engine
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
TYPO3-Solr/ext-solr#4850 ·
Maintainers usually reply within 2 days
-
[Sync EN] stream: document the errors of the stream_context_*() and stream filter functions (#6091)Opensync-en
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
[Sync EN] stream: document the errors of the stream_context_*() and stream filter functions (#6091)Opensync-en
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Перевод устарел
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
glpi-project/glpi#26353 · 2 comments ·
Maintainers usually reply within 1 day