Skip to content

fix(docs): Align docs header menu with main site - #26712

Open
Jen-Uno wants to merge 3 commits into
masterfrom
fix/docs-navbar-menu-style
Open

Jen-Uno wants to merge 3 commits into
masterfrom
fix/docs-navbar-menu-style

Conversation

@Jen-Uno

@Jen-Uno Jen-Uno commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

GitHub Issue: closes unoplatform/uno-website#2305

TL;DR: The docs header now uses the main site's menu (unoplatform/uno-website#1677), but it was still styled for the old copy. This fixes what QA found: Download and Sign In were misaligned, the Resources panel ran off the right edge, and the menu was all caps. It also removes the lines in the Resources columns, to match the main site.

PR Type:

🐞 Bugfix

What changed? 🚀

All changes are in doc/templates/uno/component/navbar.scss, plus the compiled styles/main.css and its map.

  • Download and Sign In line up. Download was a block with a 24px line height and no border. Sign In was an inline link with a 14px line height and a 2px border, so its box sat off the line. From 1024px up, both now share one box model: inline-flex, the same line height and vertical padding, and a 2px border on both. Download's border is transparent, with background-origin: border-box so the gradient's blue half doesn't show through. Both buttons are 52px tall, at the same top.
  • Resources stays inside the window. Every dropdown hung off its item at left: -25%. Resources is the only multi-column (row-menu) panel, and at about 800px wide it went past the right edge. From 1024px up it is now placed against the header, $header-padding-x (32px) in from the right, just below it. An invisible 24px bridge under the Resources link keeps the panel open while the pointer moves down into it. The bridge only covers the area under that link, so the items next to it stay clickable. The single-column Studio dropdown is unchanged.
  • The menu isn't all caps anymore. nav a is now text-transform: none, and Sign In uses capitalize. Both match the main site.
  • No lines in the Resources columns. The heading rule was li.column-title a, which also matched every link in a column, so each link got the heading's border and padding. It's now scoped to the heading (li.column-title > a), and the border is gone, as on the main site's mega menu.
  • The chevrons are centred on their labels. The Studio and Resources chevrons used vertical-align: top, which pinned them to the 14px line box, 2.5–4px above the middle of the label. From 1024px they use vertical-align: 0.1em, which keeps them within 1px of centre at the 14, 16 and 18px label sizes.

Mobile (under 1024px) keeps its layout, apart from the capitalization.

Not in this PR

How this was checked

  • Build: I ran the CI steps locally: npm ci, the external docs import, gulp clean / styles / scripts, then DocFX 2.73.2, the version CI pins. It reports 245 warnings and 1 error, the same as master with nothing new. The error is the usual local articles/implemented/toc.yml, which CI generates.
  • Rendered site: I served the built _site and opened articles/intro.html.
    • The buttons sit at 16–68px and read "Sign In".
    • The Resources panel ends 32px from the right edge.
    • With the panel open, clicks at the bottom of Pricing, Blog, Download and Sign In reach their own links.
    • None of the 18 links in the panel has a border.
    • There were no console errors.
  • Widths: checked from 1028px to 2442px, using iframes for the narrow widths.
  • Committed CSS: main.css was built with the same packages as master's. A fresh npm ci also drops an unrelated -webkit-backdrop-filter prefix (see the panel comment), and that's left out of this diff.

PR Checklist ✅

🤖 Generated with Claude Code

- Download and Sign in share one box model, so they line up
- Resources panel sits against the header, inside the window
- Menu items are no longer all caps

Refs unoplatform/uno-website#2305

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@unodevops

Copy link
Copy Markdown
Contributor

- Hover bridge sits under the Resources item only, so the items next
  to it stay clickable while the panel is open
- Download's transparent border shows the face colour, not the
  gradient's blue half
- Sign In is capitalized, as on the main site
- Shared button rule applies from 1024px only, after both button blocks
- Header horizontal padding is one variable, used by the panel too
- Resources columns lose the rule under each heading and link

Refs unoplatform/uno-website#2305

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Jen-Uno

Jen-Uno commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

Review panel: pass 1 (8 lenses, on 3418c8c)

TL;DR: fix-first, now addressed. The two real problems were the hover bridge covering Pricing to Sign in while Resources was open, and a 2px blue strip on Download's border. Both are fixed in d611eb7, along with four smaller findings. Two questions are still open, below.

Verdicts

Lens Verdict
skeptic fix-first
jerome resolve-questions-first
quality approve-with-changes
contract approve-with-changes
architect ship (with changes)
operability approve
performance approve
security no findings

Findings

# Finding Raised by Outcome
1 While Resources was open, the ul::before hover bridge (as wide as the panel) sat over the lower half of Pricing, Contact, Blog, Download and Sign in, so clicks there hit the bridge. Confirmed in the browser with elementFromPoint. skeptic Fixed in d611eb7. The bridge is now ::before on the Resources link: 24px tall, as wide as the link. Checked with the panel open: those points now hit their own links, and the panel stays open from the item into the panel. The gap it covers is at most 18px, from 1028 to 2442px wide.
2 Download has a transparent 2px border, but the background shorthand starts the gradient at the padding box, so the repeated tile showed a blue strip at the top and bottom. Confirmed with a zoomed screenshot. skeptic, performance Fixed in d611eb7: background-origin: border-box.
3 Docs showed "Sign in" while the main site shows "Sign In" (text-transform: capitalize in the theme's _header.scss). contract Fixed in d611eb7: text-transform: capitalize.
4 The shared button rule wasn't limited to desktop, so mobile display: block only won because of source order. architect, skeptic Fixed in d611eb7: the shared rule is now desktop-only (≥1024px) and comes after both button blocks. Mobile is back to the original rules.
5 right: 32px and the bridge height were magic numbers tied to the header padding. architect, contract, quality Fixed in d611eb7: $header-padding-x is used for both the header padding and the panel offset. The bridge height is now independent of the header padding.
6 A comment claimed the shared rule enforces matching vertical padding. It doesn't: each button has its own padding. quality Fixed in d611eb7: the comment now says the padding has to match.
7 line-height: 24px and text-align: center on Download duplicate the shared rule. quality Declined. Now that the shared rule is desktop-only, these are Download's mobile values again.
8 row-menu now means "anchored to the header's right edge". A second row-menu item further left would open far from its item. architect, contract Left open. Only Resources has the class today, and the class is set in WordPress. Worth knowing if the menu changes.
9 Per-item text-transform: none lines are now redundant. architect, quality Left open, as a harmless cleanup.
10 The Studio dropdown still has its old hover gap (top: 170%, no bridge). skeptic Left open. It isn't changed by this PR.
11 Docs CI uses Node 14 / npm 6 with npm install, but doc/package-lock.json is lockfileVersion 3, so Sass and autoprefixer resolve from ^ ranges. operability Left open. Not introduced here. CI rebuilds main.css from the SCSS, so the committed CSS is only for local builds.
12 The gulp styles task calls done() before the stream ends and only logs Sass errors, so a broken SCSS can ship without main.css while CI stays green. operability Left open. Not introduced here.

Also in d611eb7, separate from the panel: the Resources columns no longer have a line under each heading and link. li.column-title a also matched the links, and it's now li.column-title > a with no border, as on the main site.

Open questions

  • QA's point 4 (dark panel and icons). The PR body called deferring it "agreed in bug filing template link is broken in CONTRIBUTING.md file #1677". That overstates it: it was proposed there, and nobody has answered QA's question on unoplatform/uno-website#2305. The PR body now says so. Only the icons and descriptions need website data, and the dark panel is CSS only. The icons are drawn in #B8ADFD, which needs the dark panel to read well, so the two belong in one follow-up. (jerome)
  • When Add arbitrary delay in Safari macOS to avoid StackOverflow issues (bp #2247) #2305 closes. closes unoplatform/uno-website#2305 closes it on merge, but the change only reaches platform.uno/docs at the next docs deploy, and QA has no preview before then. (jerome)

Confirmed by the panel

  • Every selector the change relies on is present in the live /wp-json/wp/v2/menu markup (contract).
  • From 1024px up, #header-container is the containing block, with no positioned element in between (architect).
  • Nothing animates on load, and the CSS grows by about 0.5 KB (performance).
  • The commit message and PR body match the diff (quality).

How this was checked:

  • Browser: I injected the rebuilt rules into the live docs page and measured at widths from 1028 to 2442px, using iframes for the narrower widths.
  • Build: I ran the CI build steps locally: npm ci, gulp clean / styles / scripts, external docs imported, then DocFX 2.73.2 (the pinned CI version). Compared with master, the build adds no new warnings or errors. The one error is the usual local articles/implemented/toc.yml (CI generates it).
  • Rendered site: I served the built _site and opened articles/intro.html. With Resources open, the buttons sit at 16–68px and read "Sign In", the panel ends 32px from the right edge, and clicks at the bottom of Pricing, Blog, Download and Sign in reach their own links. There were no console errors.
  • Side note on finding 11: a fresh npm ci (Node 20) also drops an unrelated -webkit-backdrop-filter prefix in main.css. That's the drift described there. The committed main.css was built with the same packages as master's, so its diff only covers the navbar rules.

🤖 Generated with Claude Code

@Jen-Uno
Jen-Uno marked this pull request as ready for review November 25, 2026 17:43
@mergify

mergify Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue). If it does not match the queue conditions yet, it enters the queue once it does.

  • Queue this pull request once it meets the queue conditions

The chevron used vertical-align: top, which pinned it to the 14px line
box, 2.5-4px above the middle of the label. From 1024px it now uses
vertical-align: 0.1em, within 1px at the 14-18px label sizes. Also drops
a line-height that the font shorthand after it always overrode.

Refs unoplatform/uno-website#2305

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@unodevops

Copy link
Copy Markdown
Contributor

@Jen-Uno
Jen-Uno requested a review from agneszitte November 25, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants