diff --git a/ionic/components/toolbar/modes/ios.scss b/ionic/components/toolbar/modes/ios.scss index a029076d5d..6a6f4f2ca8 100644 --- a/ionic/components/toolbar/modes/ios.scss +++ b/ionic/components/toolbar/modes/ios.scss @@ -75,6 +75,20 @@ ion-title { transform: translateZ(0px); } +@mixin ios-toolbar-theme($color-name, $color-value) { + .toolbar[#{$color-name}] { + + .toolbar-background { + background-color: $color-value; + border-color: darken($color-value, 10%); + } + + .toolbar-title { + color: inverse($color-value); + } + } +} + // iOS Toolbar Buttons // -------------------------------------------------- @@ -183,17 +197,5 @@ ion-segment-button[button] { // -------------------------------------------------- @each $color-name, $color-value in $colors-ios { - - .toolbar[#{$color-name}] { - - .toolbar-background { - background-color: $color-value; - border-color: darken($color-value, 10%); - } - - .toolbar-title { - color: inverse($color-value); - } - } - + @include ios-toolbar-theme($color-name, $color-value); } diff --git a/ionic/components/toolbar/modes/md.scss b/ionic/components/toolbar/modes/md.scss index 9c669dd4ed..b0056aa62a 100644 --- a/ionic/components/toolbar/modes/md.scss +++ b/ionic/components/toolbar/modes/md.scss @@ -60,6 +60,19 @@ ion-title { font-weight: 500; } +@mixin md-toolbar-theme($color-name, $color-value) { + .toolbar[#{$color-name}] { + + .toolbar-background { + background-color: $color-value; + } + + .toolbar-title { + color: inverse($color-value); + } + } +} + // Material Design Toolbar Buttons // -------------------------------------------------- @@ -128,31 +141,9 @@ ion-buttons[right] { } -// Material Design Navbar -// -------------------------------------------------- - -$navbar-md-height: 5.6rem !default; - - -ion-navbar-section { - min-height: $navbar-md-height; -} - - // Material Design Toolbar Color Generation // -------------------------------------------------- @each $color-name, $color-value in $colors-md { - - .toolbar[#{$color-name}] { - - .toolbar-background { - background-color: $color-value; - } - - .toolbar-title { - color: inverse($color-value); - } - } - + @include md-toolbar-theme($color-name, $color-value); } diff --git a/ionic/components/toolbar/test/scenarios/main.html b/ionic/components/toolbar/test/scenarios/main.html index c93a93d026..585b0f5f33 100644 --- a/ionic/components/toolbar/test/scenarios/main.html +++ b/ionic/components/toolbar/test/scenarios/main.html @@ -42,17 +42,17 @@ - - - Clear + Solid - @@ -62,17 +62,17 @@ - - - Clear + Solid Activated -