From 25c6cbd29aff90f694d72afe28ab56b0113fb16a Mon Sep 17 00:00:00 2001 From: Guille Cura Date: Thu, 5 Jul 2018 02:37:43 -0300 Subject: Update stylesheets and added darkMode variable and toggle. --- src/styles/button.scss | 96 +++++++++++++++++++++++++++++++------------------- 1 file changed, 59 insertions(+), 37 deletions(-) (limited to 'src/styles/button.scss') diff --git a/src/styles/button.scss b/src/styles/button.scss index 8d2adbbcc..83ddf3e3e 100644 --- a/src/styles/button.scss +++ b/src/styles/button.scss @@ -1,71 +1,93 @@ @import './config.scss'; + +.theme__dark .franz-form__button { + background: $theme-brand-primary; + color: $dark-theme-gray-smoke; + + &:hover { background: darken($theme-brand-primary, 5%); } + &:active { background: lighten($theme-brand-primary, 5%); } + + &.franz-form__button--secondary { + background: $dark-theme-gray-lighter; + color: $dark-theme-gray-smoke; + + &:hover { background: darken($dark-theme-gray-lightest, 5%); } + &:active { background: lighten($dark-theme-gray-lightest, 5%); } + } + + &.franz-form__button--danger { + background: $theme-brand-danger; + + &:hover { background: darken($theme-brand-danger, 5%); } + &:active { background: lighten($theme-brand-danger, 5%); } + } + + &.franz-form__button--warning { + background: $theme-brand-warning; + + &:hover { background: darken($theme-brand-warning, 5%); } + &:active { background: lighten($theme-brand-warning, 5%); } + } + + &.franz-form__button--inverted { + border: 2px solid $theme-brand-primary; + color: $theme-brand-primary; + + &:hover { + background: darken($theme-brand-primary, 5%); + color: $dark-theme-gray-smoke; + } + } +} + .franz-form__button { - position: relative; background: $theme-brand-primary; + border-radius: 3px; display: block; - padding: 10px 20px; color: #FFF; - border-radius: 3px; - transition: background 0.5s; + padding: 10px 20px; + position: relative; + transition: background .5s; text-align: center; - &:hover { - background: darken($theme-brand-primary, 5%); - } + &:hover { background: darken($theme-brand-primary, 5%) } &:active { - transition: none; background: lighten($theme-brand-primary, 5%); + transition: none; } - &:disabled { - opacity: 0.2; - } + &:disabled { opacity: .2; } &.franz-form__button--secondary { background: $theme-gray-lighter; color: $theme-gray; - &:hover { - background: darken($theme-gray-lighter, 5%); - } - - &:active { - background: lighten($theme-gray-lighter, 5%); - } + &:hover { background: darken($theme-gray-lighter, 5%); } + &:active { background: lighten($theme-gray-lighter, 5%); } } &.franz-form__button--danger { background: $theme-brand-danger; - &:hover { - background: darken($theme-brand-danger, 5%); - } - - &:active { - background: lighten($theme-brand-danger, 5%); - } + &:hover { background: darken($theme-brand-danger, 5%); } + &:active { background: lighten($theme-brand-danger, 5%); } } &.franz-form__button--warning { background: $theme-brand-warning; - &:hover { - background: darken($theme-brand-warning, 5%); - } - - &:active { - background: lighten($theme-brand-warning, 5%); - } + &:hover { background: darken($theme-brand-warning, 5%); } + &:active { background: lighten($theme-brand-warning, 5%); } } &.franz-form__button--inverted { background: none; - padding: 10px 20px; border: 2px solid $theme-brand-primary; color: $theme-brand-primary; - transition: background 0.5s, color 0.5s; + padding: 10px 20px; + transition: background .5s, color .5s; &:hover { background: darken($theme-brand-primary, 5%); @@ -74,11 +96,11 @@ } .loader { + display: inline-block; + height: 12px; + margin-right: 5px; position: relative; width: 20px; - height: 12px; z-index: 9999; - display: inline-block; - margin-right: 5px; } } -- cgit v1.2.3-70-g09d2