@@ -688,12 +688,29 @@ export const createComponents = (themeConfig: ThemeConfig): Components => {
688688 root : {
689689 // Controls the page inset as in PF6 -- only in desktop view
690690 '@media (min-width: 600px)' : {
691+ // The size of the page inset border
692+ '--rhdh-v1-page-inset' : '1.5rem' ,
691693 backgroundColor : general . sidebarBackgroundColor ,
694+ // Cancel out the spacing produced by the page inset border when
695+ // the global header is present
696+ "& #global-header ~ main, & #global-header ~ [class*='MuiLinearProgress-root']" :
697+ {
698+ marginTop : 'calc(-1 * var(--rhdh-v1-page-inset))' ,
699+ } ,
700+ // Cancel out the spacing produced by the page inset border when
701+ // the sidebar is present
702+ "& nav ~ main, & nav ~ [class*='MuiLinearProgress-root']" : {
703+ marginLeft : 'calc(-1 * var(--rhdh-v1-page-inset))' ,
704+ } ,
705+ // The border + border radius emulates the PF6 page inset look without
706+ // needing to change the markup
692707 "& > [class*='MuiLinearProgress-root'], & > main" : {
693- borderRadius : '2.5rem' ,
694- border : `1.5rem solid ${ general . sidebarBackgroundColor } ` ,
695- marginLeft : '-1.5rem' ,
708+ borderRadius : 'calc(1rem + var(--rhdh-v1-page-inset))' ,
709+ border : `var(--rhdh-v1-page-inset) solid ${ general . sidebarBackgroundColor } ` ,
696710 } ,
711+ // The Backstage suspense is an MUI LinearProgress that is not wrapped by
712+ // a `main`. We need to give it 100vh height to fill the page for the page
713+ // inset to look right.
697714 "& > [class*='MuiLinearProgress-root']" : {
698715 backgroundColor : general . mainSectionBackgroundColor ,
699716 height : '100vh' ,
@@ -835,6 +852,7 @@ export const createComponents = (themeConfig: ThemeConfig): Components => {
835852 styleOverrides : {
836853 root : {
837854 height : '3px' ,
855+ zIndex : 1 ,
838856 } ,
839857 vertical : {
840858 width : '3px' ,
0 commit comments