Skip to content

fix(layer): keep sub-navigation header height on error page - #1475

Open
shkomg wants to merge 1 commit into
nuxt-content:mainfrom
userstoriesbot-showcase:fix/error-page-sub-header
Open

shkomg wants to merge 1 commit into
nuxt-content:mainfrom
userstoriesbot-showcase:fix/error-page-sub-header

Conversation

@shkomg

@shkomg shkomg commented Nov 3, 2026

Copy link
Copy Markdown

Fixes #1438

With navigation.sub: 'header', a missing page under an existing section rendered the error page with the two-row header squeezed into 64px, because error.vue lacked the docus-sub-header wrapper class that app.vue sets.

  • error.vue calls useSubNavigation(navigation) and adds the same docus-sub-header class to its wrapper, so the variable sits on the common ancestor of the header and the error content, like in app.vue.
  • The @media (min-width: 1024px) { .docus-sub-header { --ui-header-height: 112px } } rule moved from the <style> block in app.vue into the layer's docus.css template, so it also applies when only the error template renders.

Checked in the playground with navigation.sub: 'header' at 1280px: /docs/getting-started/does-not-exist now has a 112px header (64px before), on direct load and after client-side navigation; normal docs pages are unchanged at 112px, and below 1024px the header stays 64px. ESLint on the changed files, typecheck and unit tests pass.

Before After
before after
before, header zoomed 3x after, header zoomed 3x

The video shows the playground with the header tab bar enabled, opening a missing page under Getting Started, where the error page header now matches the other pages.

docus.mp4

Fix written with Claude Code; video is an automated browser run of this branch recorded by User Stories Bot.

error.vue now sets the docus-sub-header class like app.vue, and the
112px header height rule moved into the layer global CSS so both
templates share it.
@vercel

vercel Bot commented Nov 3, 2026

Copy link
Copy Markdown

@shkomg is attempting to deploy a commit to the NuxtLabs Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error page header collapses to 64px when navigation.sub is 'header'

1 participant