From c75c86e16c588f74d69e5cb5aef42e1bac3c5296 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Wed, 6 May 2020 22:48:07 +0200 Subject: [PATCH] Add focus and active override styles --- .../stylesheets/overrides/_buttons.scss | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/overrides/_buttons.scss b/app/assets/stylesheets/overrides/_buttons.scss index 33e5ef5b..8b2623ba 100644 --- a/app/assets/stylesheets/overrides/_buttons.scss +++ b/app/assets/stylesheets/overrides/_buttons.scss @@ -4,9 +4,11 @@ @each $color in $color-names { .btn-#{$color} { + color: RGB(var(--#{$color}-text)); background-color: var(--#{$color}); border-color: var(--#{$color}); + border-width: 0; &:hover { background: linear-gradient( @@ -16,12 +18,33 @@ ) var(--#{$color}); } - &:active { + &:not(:disabled):not(.disabled):active, + &:not(:disabled):not(.disabled).active { + border: none; background: linear-gradient( to top, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25) ) var(--#{$color}); + + &:focus { + background: linear-gradient( + to top, + rgba(0, 0, 0, 0.30), + rgba(0, 0, 0, 0.30) + ) var(--#{$color}); + box-shadow: none; + } + } + + &:focus, + &:focus:hover { + background: linear-gradient( + to top, + rgba(0, 0, 0, 0.30), + rgba(0, 0, 0, 0.30) + ) var(--#{$color}); + box-shadow: none; } }