From bf0ce0278269842a72f6fa9e717475f51d22bd8b Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Thu, 14 Jan 2016 17:05:16 -0600 Subject: [PATCH] Refactored drawer and layout classes. #822 changed responsive nature to be declarative based on mdb-drawer-open-* classes, and allow plain mdb-drawer-open to signal the drawer should render open. --- docs/examples/dashboard/example.scss | 27 +++++++--- docs/examples/dashboard/index.html | 4 +- scss/_drawer.scss | 74 ++++++++++++++++++---------- scss/_layout.scss | 70 ++++++++++---------------- scss/_mixins.scss | 1 + scss/mixins/_drawer.scss | 6 +-- scss/variables/_drawer.scss | 2 +- scss/variables/_layout.scss | 5 +- 8 files changed, 99 insertions(+), 90 deletions(-) diff --git a/docs/examples/dashboard/example.scss b/docs/examples/dashboard/example.scss index 56a16f54..fe35ee60 100644 --- a/docs/examples/dashboard/example.scss +++ b/docs/examples/dashboard/example.scss @@ -19,19 +19,30 @@ a, a:hover { color: rgba(255, 255, 255, 0.56); } -.mdb-layout { +.mdb-layout-header { + background-color: $grey-100; + color: $grey-600; - .mdb-layout-header { - background-color: $grey-100; - color: $grey-600; - } + > .navbar { + // .navbar is not flex based by default, so have to vertical align with padding. + // If this were my own app, I would flex position items in my navbar and stick .mdb-layout-header on my existing .navbar + // instead of wrapping it. But nonetheless, this example shows how this can work with minimal markup to match an MDL design. + $header-height: 3.5rem !default; // 56px + $line-height: 1.5; - .mdb-layout-content { - padding-top: .5rem; - background-color: $grey-100; + min-height: $header-height; + + $padding: ($header-height - (1rem * $line-height)) / 2; + padding-top: $padding; + padding-bottom: $padding; } } +.mdb-layout-content { + padding-top: .5rem; + background-color: $grey-100; +} + .mdb-layout-drawer { background-color: $blue-grey-900; color: $blue-grey-50; diff --git a/docs/examples/dashboard/index.html b/docs/examples/dashboard/index.html index 19bcfc0f..4dde2ee5 100644 --- a/docs/examples/dashboard/index.html +++ b/docs/examples/dashboard/index.html @@ -7,8 +7,8 @@ group: material-design -
-
+
+