Reputation: 41
I want to change the sidebar width in docusaurus, I am only allowed to change the width of sidebar in a particular page.Can anyone suggest me a solution
Upvotes: 4
Views: 1989
Reputation: 126
In version ~2.0.0 you can create your own CSS files (/src/css/custom.css) by defining it in the docusaurus.config.js
. There you can set your override styles. When inspecting the page, there's Docusaurus sets the variable for --doc-sidebar-width: 300px;
I was able to override that variable with an !important
:
:root {
--doc-sidebar-width: 250px !important;
}
Upvotes: 8