[v2] Ant Design components don't work correctly (body > div sets height 100%) #2364
Labels
bug
An error in the Docusaurus core causing instability or issues with its execution
Milestone
🐛 Bug Report
The components we are trying to document use Ant Design (https://ant.design). The docusaurus stylesheet contains the following:
This causes a problem with Ant Design (and potentially other libs) as their code creates a div under body for some components, and expect these to not be 100% height. The additional height causes issue for mouse events and effectively locks up most of the page.
Have you read the Contributing Guidelines on issues?
Yes
To Reproduce
Note that the example project below is using Lerna. This is just to make the repro easier -- our actual project doesn't use Lerna but exhibits the same behaviour.
lerna bootstrap
cd docusaurus-site
npm start
Expected behavior
Page should continue to work.
Actual Behavior
Page is unresponsive. This is due to height 100% on the div that antd adds to end of body:
A workaround is to force
body > div
to be auto size incustom.css
:It looks to me that there is only one div in the default docusaurus page and it has an id, so maybe a more specific css rule would be more appropriate in the default stylesheet.
Your Environment
Reproducible Demo
https://github.com/jugglingcats/docusaurus-repro
See above for detailed steps.
The text was updated successfully, but these errors were encountered: