Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outline overflows navbar when sidebar not present #2442

Closed
4 tasks done
elringus opened this issue May 29, 2023 · 3 comments · Fixed by #2742
Closed
4 tasks done

Outline overflows navbar when sidebar not present #2442

elringus opened this issue May 29, 2023 · 3 comments · Fixed by #2742
Labels
bug Something isn't working contribution welcome The team would welcome a contribution from the community for this issue theme Related to the theme
Milestone

Comments

@elringus
Copy link

Describe the bug

When sidebar is not present, the page is not scrolled and outline is scrolled down, it overflows the navbar.

img

Reproduction

https://stackblitz.com/edit/vite-v81ufa

  1. Make sure width is high enough so that outline is shown
  2. Without scrolling the main page content hover over the outline and scroll down
  3. Observe that the outline overflows the navbar

Expected behavior

Outline is clipped when over navbar in the same way when sidebar is present.

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (16) x64 Intel(R) Core(TM) i7-6900K CPU @ 3.20GHz
    Memory: 45.66 GB / 63.92 GB
  Binaries:
    Node: 18.2.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 9.6.6 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 113.0.5672.127
    Edge: Spartan (44.19041.1266.0), Chromium (113.0.1774.50)
  npmPackages:
    vitepress: ^1.0.0-beta.1 => 1.0.0-beta.1

Additional context

No response

Validations

@elringus elringus added the bug: pending triage Maybe a bug, waiting for confirmation label May 29, 2023
@elringus
Copy link
Author

elringus commented May 30, 2023

UPD: The navbar is also not clipping the underlying content when navigating to an anchor. Example: https://naninovel.github.io/api/#print — notice how both the page content and outline overflow the navbar. It starts to work correctly only after the page is scrolled up to the start and then back down.

img

@zonemeen zonemeen added bug Something isn't working contribution welcome The team would welcome a contribution from the community for this issue theme Related to the theme and removed bug: pending triage Maybe a bug, waiting for confirmation labels May 30, 2023
@elringus
Copy link
Author

I'll try to fix this. If anyone have any tips on where to look at, please share.

@elringus
Copy link
Author

elringus commented Jun 2, 2023

So in the end I've fixed this with a simple css override making the navbar semi-transparent with blur filter. It both looks better and provide better UX visually expanding content space. Coincidentally, it also allows to remove .curtain element which is blocking user input while being mostly transparent (the thing that appears below navbar when scrolling down for some kind of fade off effect).

vid.mp4

If anyone is interested here is the css I've used:

:root {
    --nav-c-bg: rgba(255, 255, 255, 0.5);
}

.dark {
    --nav-c-bg: rgba(30, 30, 32, 0.5);
}

.curtain {
    display: none !important;
}

.fill {
    background: transparent !important;
}

.content-body {
    background: var(--nav-c-bg) !important;
}

.content-body::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: saturate(180%) blur(5px);
    z-index: -1;
}

@elringus elringus closed this as completed Jun 2, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 10, 2023
@vuejs vuejs unlocked this conversation Aug 6, 2023
@brc-dd brc-dd reopened this Aug 6, 2023
@brc-dd brc-dd added this to the v1.0.0 milestone Aug 6, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working contribution welcome The team would welcome a contribution from the community for this issue theme Related to the theme
Projects
None yet
3 participants