From 4345c79604425b91fe89a75359d3007bee34be93 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Thu, 17 Dec 2015 10:00:17 -0600 Subject: [PATCH] fab and raised now share some behavior for colors/shadows on hover/focus/active, though their baseline shadows are different. Spec is silent on fabs having hover/focus state, but UI is more responsive making them behave more like the raised, and "responsive UI" is a core concept of material design. Colored icons now back to default #fff, much better contrast, looks cleaner. --- scss/_buttons.scss | 25 +++++++++++++------------ scss/variables/bootstrap/_buttons.scss | 10 +++++----- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/scss/_buttons.scss b/scss/_buttons.scss index a50c83f8..a171bc00 100644 --- a/scss/_buttons.scss +++ b/scss/_buttons.scss @@ -24,27 +24,20 @@ // flat removes bg, add color variations to text @include mdb-button-color(); - // fab and raised are colored, add their text and bg + // fab and raised + // - colored, add their text and bg + // - hover color contrasted + // - shared shadow state on hover/active/focus &.btn-fab, &.btn-raised, .btn-group-raised & { @include mdb-button-colored(); - } - - //--- - // btn-raised - &.btn-raised, - .btn-group-raised & { - - // baseline shadow - @include shadow-2dp(); // contrast bg colors on hover, focus, active @include mdb-hover-focus-active() { @include mdb-button-colored-bg(true); //border: 1px solid $red; } - // enlarged shadow on hover, focus @include hover-focus() { //border: 1px solid $blue; @@ -58,6 +51,15 @@ @include focus-shadow(); //border: 1px solid $green; } + } + + //--- + // btn-raised + &.btn-raised, + .btn-group-raised & { + + // baseline shadow + @include shadow-2dp(); // reverse any of the above for links &.btn-link { @@ -75,7 +77,6 @@ // https://www.google.com/design/spec/components/buttons-floating-action-button.html &.btn-fab { // see above for color variations - position: relative; width: $mdb-btn-fab-size; min-width: $mdb-btn-fab-size; height: $mdb-btn-fab-size; diff --git a/scss/variables/bootstrap/_buttons.scss b/scss/variables/bootstrap/_buttons.scss index 35a4bd9d..38dc0b0b 100644 --- a/scss/variables/bootstrap/_buttons.scss +++ b/scss/variables/bootstrap/_buttons.scss @@ -6,7 +6,7 @@ $btn-padding-x: 1.875rem !default; // 1rem $btn-padding-y: .5rem !default; // .375rem $btn-font-weight: 500 !default; // normal // -$btn-primary-color: $mdb-text-color-light !default; // #fff +//$btn-primary-color: #fff !default; //$btn-primary-bg: $brand-primary !default; //$btn-primary-border: $btn-primary-bg !default; // @@ -14,19 +14,19 @@ $btn-secondary-color: $gray-dark !default; $btn-secondary-bg: $body-bg !default; // #fff //$btn-secondary-border: #ccc !default; // -$btn-info-color: $mdb-text-color-light !default; // #fff +//$btn-info-color: #fff !default; //$btn-info-bg: $brand-info !default; //$btn-info-border: $btn-info-bg !default; // -$btn-success-color: $mdb-text-color-light !default; // #fff +//$btn-success-color: #fff !default; //$btn-success-bg: $brand-success !default; //$btn-success-border: $btn-success-bg !default; // -$btn-warning-color: $mdb-text-color-light !default; // #fff +//$btn-warning-color: #fff !default; //$btn-warning-bg: $brand-warning !default; //$btn-warning-border: $btn-warning-bg !default; // -$btn-danger-color: $mdb-text-color-light !default; // #fff +//$btn-danger-color: #fff !default; //$btn-danger-bg: $brand-danger !default; //$btn-danger-border: $btn-danger-bg !default; //