facebook / facebook/docusaurus
Docs - main.docMainContainer has bad max-width when there is no sidebar
- Vorherrschende Sprache
- TypeScript
- Sterne
- 66.2k
- Forks
- 10k
- Ø Merge
- 1 T. 3 Std.
- Gemergte PRs (30 T.)
- 52
Beschreibung
### Have you read the Contributing Guidelines on issues?
- [X] I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#issues).
### Prerequisites
- [X] I'm using the latest version of Docusaurus.
- [X] I have tried the `npm run clear` or `yarn clear` command.
- [X] I have tried `rm -rf node_modules yarn.lock package-lock.json` and re-installing packages.
- [X] I have tried creating a repro with https://new.docusaurus.io.
- [X] I have read the console error message carefully (if applicable).
### Description
Why is the docmaincontainers' width not 100% When the doc has no sidebar? We substract '30px' which leads to the fact we are not using the full width. This logic only makes sense if you have hideable sidebar enabled (configured) in the first place, and secondly IF the page contains a sidebar.
https://docusaurus.io/docs/sidebar#hideable-sidebar

### Reproducible demo
_No response_
### Steps to reproduce
Visit: https://docs.boc-group.com/adonis/en/docs/15.0/news/
Inspect docMainContainer, you will notice that calc(100% - var(--doc-sidebar-hidden-width)) where doc-sidebar-hidden-width is 30px, but it should be 0 in case there is no sidebar. Additionally it should globally be 0 if this was not configured in docusaurus.config.js because by default it is set to false.

### Expected behavior
I expect that the global variable --doc-sidebar-hidden-width = 0px IF hideable sidebar is not configured on docusaurs.config AND if the page contains no sidebar. Otherwise it can be 30px
### Actual behavior
I expect that the global variable --doc-sidebar-hidden-width = 0px IF hideable sidebar is not configured on docusaurs.config AND if the page contains no sidebar. Otherwise it can be 30px
### Your environment
- Public source code:
- Public site URL: https://docs.boc-group.com/adonis/en/docs/15.0/news/
- Docusaurus version used: **latest**
- Environment name and version (e.g. Chrome 89, Node.js 16.4):
- Operating system and version (e.g. Ubuntu 20.04.2 LTS):
### Self-service
- [ ] I'd be willing to fix this bug myself.
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.