Skip to content

Commit

Permalink
[docs] Fix layout regression (mui#27266)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jul 14, 2021
1 parent 6c2e1a5 commit 01f1de8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/src/modules/components/AppLayoutDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@ import AdManager from 'docs/src/modules/components/AdManager';
import AdGuest from 'docs/src/modules/components/AdGuest';
import AppLayoutDocsFooter from 'docs/src/modules/components/AppLayoutDocsFooter';

const TOC_WIDTH = 175;
const NAV_WIDTH = 240;

const useStyles = makeStyles((theme) => ({
root: {
display: 'flex',
width: '100%',
[theme.breakpoints.up('lg')]: {
width: `calc(100% - ${NAV_WIDTH}px)`,
},
},
container: {
position: 'relative',
Expand All @@ -39,7 +45,7 @@ const useStyles = makeStyles((theme) => ({
},
toc: {
[theme.breakpoints.up('sm')]: {
width: 'calc(100% - 175px)',
width: `calc(100% - ${TOC_WIDTH}px)`,
},
},
disableToc: {
Expand Down Expand Up @@ -76,12 +82,12 @@ function AppLayoutDocs(props) {
)}
<main
className={clsx(classes.root, {
[classes.toc]: !disableToc,
[classes.disableToc]: disableToc,
})}
>
<AppContainer
className={clsx(classes.container, {
[classes.toc]: !disableToc,
[classes.ad]: !disableAd,
})}
>
Expand Down

0 comments on commit 01f1de8

Please sign in to comment.