From 50d87b5fc199328cfada792cdbc2fec34ef7d330 Mon Sep 17 00:00:00 2001 From: Clement Yan Date: Wed, 16 Oct 2024 06:51:00 +0800 Subject: [PATCH] Website: Wrap navbar when there is not enough space (#6541) ## What's the problem this PR addresses? When there isn't enough horizontal space, the scrollbar appears for the navbar. Fixes #6070 Fixes #6537 ## How did you fix it? Wraps the navbar instead if there isn't enough horizontal space. The [VSCode website](https://code.visualstudio.com/) does that too so it isn't like out of the way either https://github.com/user-attachments/assets/a7ed8307-d9df-4539-af21-59856ffe6463 ## Checklist - [x] I have read the [Contributing Guide](https://yarnpkg.com/advanced/contributing). - [x] I have set the packages that need to be released for my changes to be effective. - [x] I will check that all automated PR checks pass before the PR gets reviewed. --- packages/docusaurus/src/css/custom.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/docusaurus/src/css/custom.css b/packages/docusaurus/src/css/custom.css index ab1dc4413fb7..b2f6c2dae0a2 100644 --- a/packages/docusaurus/src/css/custom.css +++ b/packages/docusaurus/src/css/custom.css @@ -111,6 +111,14 @@ html.blog-wrapper .container { .navbar { top: -1px; + height: auto; +} + +.navbar__items { + flex: 1 0 min-content; +} +.navbar__items--right { + margin-left: auto; } .navbar__brand {