Wrappers are added to layout areas to keep content on top of styled generated content (for adding backgrounds).master
@@ -1,5 +1,5 @@ | |||||
{ | { | ||||
"version": "0.2.2", | |||||
"version": "0.2.3", | |||||
"license": "MIT", | "license": "MIT", | ||||
"main": "dist/index.js", | "main": "dist/index.js", | ||||
"typings": "dist/index.d.ts", | "typings": "dist/index.d.ts", | ||||
@@ -29,6 +29,8 @@ const SidebarOverflow = styled('div')({ | |||||
height: '100%', | height: '100%', | ||||
overflow: 'auto', | overflow: 'auto', | ||||
// overflow: 'overlay', | // overflow: 'overlay', | ||||
position: 'relative', | |||||
zIndex: 1, | |||||
scrollbarWidth: 'none', | scrollbarWidth: 'none', | ||||
'::-webkit-scrollbar': { | '::-webkit-scrollbar': { | ||||
display: 'none', | display: 'none', | ||||
@@ -71,6 +71,8 @@ const SidebarMainOverflow = styled('div')({ | |||||
overflow: 'auto', | overflow: 'auto', | ||||
// overflow: 'overlay', | // overflow: 'overlay', | ||||
scrollbarWidth: 'none', | scrollbarWidth: 'none', | ||||
position: 'relative', | |||||
zIndex: 1, | |||||
'::-webkit-scrollbar': { | '::-webkit-scrollbar': { | ||||
display: 'none', | display: 'none', | ||||
}, | }, | ||||
@@ -117,6 +119,8 @@ const SidebarMenuSize = styled('div')({ | |||||
height: '100%', | height: '100%', | ||||
maxWidth: `calc(${configVar('base-width')} * 2)`, | maxWidth: `calc(${configVar('base-width')} * 2)`, | ||||
margin: '0 auto', | margin: '0 auto', | ||||
position: 'relative', | |||||
zIndex: 1, | |||||
[minWidthFactor(3)]: { | [minWidthFactor(3)]: { | ||||
maxWidth: 'none', | maxWidth: 'none', | ||||
marginRight: 0, | marginRight: 0, | ||||
@@ -40,6 +40,11 @@ const SidebarBase = styled('div')({ | |||||
}, | }, | ||||
}) | }) | ||||
const SidebarMainContent = styled('div')({ | |||||
position: 'relative', | |||||
zIndex: 1, | |||||
}) | |||||
export const SidebarMainContainer = styled('div')({ | export const SidebarMainContainer = styled('div')({ | ||||
padding: '0 1rem', | padding: '0 1rem', | ||||
boxSizing: 'border-box', | boxSizing: 'border-box', | ||||
@@ -106,7 +111,9 @@ export const Layout: React.FC<Props> = ({ | |||||
</ContentBase> | </ContentBase> | ||||
<SidebarBase> | <SidebarBase> | ||||
<SidebarMainComponent> | <SidebarMainComponent> | ||||
{sidebarMain} | |||||
<SidebarMainContent> | |||||
{sidebarMain} | |||||
</SidebarMainContent> | |||||
</SidebarMainComponent> | </SidebarMainComponent> | ||||
</SidebarBase> | </SidebarBase> | ||||
</> | </> | ||||
@@ -38,6 +38,8 @@ const Container = styled('div')({ | |||||
height: '100%', | height: '100%', | ||||
display: 'flex', | display: 'flex', | ||||
alignItems: 'center', | alignItems: 'center', | ||||
position: 'relative', | |||||
zIndex: 1, | |||||
}) | }) | ||||
const NarrowContainer = styled(Container)({ | const NarrowContainer = styled(Container)({ | ||||