mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-27 03:54:13 +03:00
76 lines
2.0 KiB
SCSS
76 lines
2.0 KiB
SCSS
// This is a set of flex-based layout containers necessary for components such as the drawer.
|
|
// It allows for flex based positioning such as sticky header and footer inside an mdb-layout, with a
|
|
// mdb-layout-content that scrolls.
|
|
|
|
// First element
|
|
.mdb-layout-canvas { // added by js?
|
|
position: absolute;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
// Primary layout container, belongs inside a mdb-layout-canvas.
|
|
.mdb-layout-container {
|
|
position: relative;
|
|
display: flex;
|
|
width: 100%;
|
|
height: 100%;
|
|
flex-direction: column; // allows for sticky header and footer
|
|
overflow-x: hidden;
|
|
overflow-y: auto;
|
|
-webkit-overflow-scrolling: touch; // TODO: why?
|
|
}
|
|
|
|
// Header layout (fixed top), belongs in a mdb-layout-container
|
|
.mdb-layout-header {
|
|
z-index: 3;
|
|
display: flex;
|
|
width: 100%;
|
|
max-height: 1000px;
|
|
flex-direction: column; // since this is a column, it is necessary that something like an actual navbar is a child
|
|
flex-wrap: nowrap;
|
|
flex-shrink: 0;
|
|
justify-content: flex-start;
|
|
}
|
|
|
|
// Content layout, belongs in a mdb-layout-container
|
|
.mdb-layout-content {
|
|
position: relative;
|
|
z-index: 1; // under a header
|
|
display: inline-block;
|
|
//-ms-flex: 0 1 auto; // Fix IE10 bug.
|
|
overflow-x: hidden;
|
|
overflow-y: auto;
|
|
flex-grow: 1;
|
|
-webkit-overflow-scrolling: touch; // TODO: why?
|
|
}
|
|
|
|
// Pushes content to the other end
|
|
.mdb-layout-spacer {
|
|
flex-grow: 1;
|
|
}
|
|
|
|
// Backdrop - generic backdrop to be used by other components i.e. drawer in overlay mode
|
|
.mdb-layout-backdrop {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
z-index: 4;
|
|
width: 100%;
|
|
height: 100%;
|
|
visibility: hidden;
|
|
background-color: transparent;
|
|
transition-property: background-color;
|
|
@include material-animation-default();
|
|
|
|
@supports (pointer-events: auto) {
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
opacity: 0;
|
|
transition-property: opacity;
|
|
visibility: visible;
|
|
pointer-events: none;
|
|
}
|
|
|
|
// NOTE: the &.in style is responsive, generated by @mixin mdb-layout-backdrop-in() where needed.
|
|
}
|