[docs] Fix TOC-related styles not being applied when disableAd=true #32733
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In MUI X I've noticed that some pages have horizontal scroll on smaller screens, for example:
https://mui.com/x/react-data-grid/state/
Screen.Recording.2022-05-11.at.11.43.40.mov
I've tracked this down to this:
material-ui/docs/src/modules/components/AppLayoutDocs.js
Lines 39 to 57 in 7028a34
Here you can see that
!disableToc
styles are nested inside!disableAd
styles, so they are not applied unlessdisableAd=false
. The page in MUI X I've linked above hasdisableAd=true
, and missing TOC-related style cause horizontal scroll.This seems to be a regression from
bf225c3
(#27150)TOC-related styles should be applied regardless
disableAd
prop, so I've moved them one level up.In core repo I've found only one page affected by this issue - https://mui.com/material-ui/discover-more/backers/.
Same page with the fix: https://deploy-preview-32733--material-ui.netlify.app/material-ui/discover-more/backers/.