2016-01-26 21:12:48 +03:00
|
|
|
// This is a set of flex-based layout containers necessary for components such as the drawer.
|
2016-03-21 17:56:51 +03:00
|
|
|
// It allows for flex based positioning such as sticky header and footer inside an bmd-layout, with a
|
|
|
|
// bmd-layout-content that scrolls.
|
2016-01-26 21:12:48 +03:00
|
|
|
|
|
|
|
// mobile webkit smooth scrolling: http://stackoverflow.com/a/15147497/2363935
|
|
|
|
|
|
|
|
// First element
|
2016-03-21 17:56:51 +03:00
|
|
|
.bmd-layout-canvas { // added by js?
|
2016-01-26 21:12:48 +03:00
|
|
|
position: absolute;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
2016-03-21 17:56:51 +03:00
|
|
|
// Primary layout container, belongs inside a bmd-layout-canvas.
|
|
|
|
.bmd-layout-container {
|
2016-01-26 21:12:48 +03:00
|
|
|
position: relative;
|
|
|
|
display: flex;
|
2016-02-08 22:42:01 +03:00
|
|
|
flex-direction: column; // allows for sticky header and footer
|
2016-01-26 21:12:48 +03:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
overflow-x: hidden;
|
|
|
|
overflow-y: auto;
|
|
|
|
-webkit-overflow-scrolling: touch; // mobile webkit smooth scrolling
|
|
|
|
}
|
|
|
|
|
2016-03-21 17:56:51 +03:00
|
|
|
// Header layout (fixed top), belongs in a bmd-layout-container
|
|
|
|
.bmd-layout-header {
|
2016-01-26 21:12:48 +03:00
|
|
|
z-index: 3;
|
|
|
|
display: flex;
|
|
|
|
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;
|
2016-02-08 22:42:01 +03:00
|
|
|
width: 100%;
|
|
|
|
max-height: 1000px;
|
2016-01-26 21:12:48 +03:00
|
|
|
transform: translateZ(0); // mobile webkit smooth scrolling
|
|
|
|
@include material-animation-default();
|
|
|
|
}
|
|
|
|
|
2016-03-21 17:56:51 +03:00
|
|
|
// Content layout, belongs in a bmd-layout-container
|
|
|
|
.bmd-layout-content {
|
2016-01-26 21:12:48 +03:00
|
|
|
position: relative;
|
|
|
|
z-index: 1; // under a header
|
|
|
|
display: inline-block;
|
|
|
|
//-ms-flex: 0 1 auto; // Fix IE10 bug.
|
|
|
|
flex-grow: 1;
|
|
|
|
overflow-x: hidden;
|
|
|
|
overflow-y: auto; // mobile webkit smooth scrolling may need scroll, but auto seems to be working and omits the scroll border
|
|
|
|
-webkit-overflow-scrolling: touch; // mobile webkit smooth scrolling
|
|
|
|
@include material-animation-default();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Pushes flex-based content to the other end (x or y)
|
2016-03-21 17:56:51 +03:00
|
|
|
.bmd-layout-spacer {
|
2016-01-26 21:12:48 +03:00
|
|
|
flex-grow: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Backdrop - generic backdrop to be used by other components i.e. drawer in overlay mode
|
2016-03-21 17:56:51 +03:00
|
|
|
.bmd-layout-backdrop {
|
2016-01-26 21:12:48 +03:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-03-21 17:56:51 +03:00
|
|
|
// NOTE: the &.in style is responsive, generated by @mixin bmd-layout-backdrop-in() where needed.
|
2016-01-26 21:12:48 +03:00
|
|
|
}
|