Unable to reduce the Sidebar width for Docs page #4569
Labels
bug
An error in the Docusaurus core causing instability or issues with its execution
closed: duplicate
This issue or pull request already exists in another issue or pull request
🐛 Bug Report
Unable to reduce the sidebar width, I would like to reduce the sidebar width for my Docs page. After inspecting the page, I notice the standard width is 300px and this is coming from a variable
--doc-sidebar-width: 300px;
So, I tried to override this CSS variable by placing the below code in the
src/css/custom.css
pageBut no luck!!! The interesting thing is from inspect mode
--doc-sidebar-width:
shown as200
in line number3083
but it's not effective. again at line number3814
this is resetting to300
. So I conclude this as a bug as resetting infima variable via Global CSS filesrc/css/custom.css
isn't taking any precedence and effectiveplease note below screen shots are my local machine using google chrome browser. However when I reproduce the same via CodeSandbox the line numbers are changing but same behavior
Have you read the Contributing Guidelines on issues?
yes
To Reproduce
npx @docusaurus/init@latest init my-website classic
cd my-website
andyarn run start
Expected behavior
When I used the below code inside the CSS file, I expect this code should work and the Sidebar width gets adjusted to 200px instead of 300px
Actual Behavior
When I used the below code inside the CSS file, I noticed this code isn't working and the Sidebar width isn't gets adjusted to 200px instead of 300px
Your Environment
Reproducible Demo
Code Sandbox link - https://yy8g9.sse.codesandbox.io/docs/
docusaurus.config.js
custom.css
The text was updated successfully, but these errors were encountered: