fix(drawer): Improved drawer and fixed examples

This commit is contained in:
Federico Zivolo 2017-12-11 12:53:59 +01:00
parent f5451c7ffe
commit 0463e049fb
7 changed files with 20 additions and 8 deletions

View File

@ -1348,3 +1348,10 @@ body.mdbootstrap .partner.creativetim {
box-shadow: inset 0 -2px 0 0 rgba(95, 45, 171, 0.5) !important; } box-shadow: inset 0 -2px 0 0 rgba(95, 45, 171, 0.5) !important; }
.algolia-autocomplete .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content { .algolia-autocomplete .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content {
background-color: rgba(208, 189, 236, 0.15) !important; } background-color: rgba(208, 189, 236, 0.15) !important; }
[data-example-id*="drawer"] .bmd-layout-canvas {
min-height: 150px;
display: flex;
flex-direction: column; }
[data-example-id*="drawer"] .bmd-layout-canvas .bmd-layout-container {
flex: 1; }

File diff suppressed because one or more lines are too long

3
assets/scss/_drawer.scss Normal file
View File

@ -0,0 +1,3 @@
[data-example-id*="drawer"] .bmd-layout-canvas {
min-height: 150px;
}

View File

@ -55,3 +55,6 @@
@import "syntax"; @import "syntax";
@import "anchor"; @import "anchor";
@import "algolia"; @import "algolia";
// Custom MDB Drawer styling for docs
@import "drawer";

View File

@ -14,8 +14,7 @@
overflow: visible; overflow: visible;
overflow-y: auto; overflow-y: auto;
font-size: .875rem; font-size: .875rem;
//color: $bmd-layout-drawer-text-color; background: $bmd-layout-drawer-bg-color;
//background: $bmd-layout-drawer-bg-color;
// Transform offscreen. // Transform offscreen.
transition: transform; transition: transform;

View File

@ -6,8 +6,8 @@
// First element // First element
.bmd-layout-canvas { .bmd-layout-canvas {
// added by js? display: flex;
position: absolute; flex-direction: column;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
@ -15,13 +15,12 @@
// Primary layout container, belongs inside a bmd-layout-canvas. // Primary layout container, belongs inside a bmd-layout-canvas.
.bmd-layout-container { .bmd-layout-container {
position: relative; position: relative;
flex: 1;
display: flex; display: flex;
flex-direction: column; // allows for sticky header and footer flex-direction: column; // allows for sticky header and footer
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow-x: hidden; overflow: hidden;
overflow-y: auto;
-webkit-overflow-scrolling: touch; // mobile webkit smooth scrolling
} }
// Header layout (fixed top), belongs in a bmd-layout-container // Header layout (fixed top), belongs in a bmd-layout-container

View File

@ -1,4 +1,5 @@
// Drawer // Drawer
$bmd-layout-drawer-bg-color: $white;
// Sizing // Sizing
$bmd-drawer-x-size: 240px !default; $bmd-drawer-x-size: 240px !default;