From 923fe3d08247c8db4f82db371255f52d4821545a Mon Sep 17 00:00:00 2001 From: Kris Date: Mon, 30 Oct 2023 12:44:38 -0400 Subject: [PATCH] UX: fix `btn-flat` focus style (#24156) --- .../common/components/buttons.scss | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/app/assets/stylesheets/common/components/buttons.scss b/app/assets/stylesheets/common/components/buttons.scss index 56d8936a620..785885e3d6f 100644 --- a/app/assets/stylesheets/common/components/buttons.scss +++ b/app/assets/stylesheets/common/components/buttons.scss @@ -306,11 +306,19 @@ color: var(--primary-low-mid); transition: color 0.25s; } - @include hover { - background: transparent; - color: var(--primary); - .d-icon { + .discourse-no-touch & { + &:hover, + &:focus { color: var(--primary); + .d-icon { + color: var(--primary); + } + } + &:hover { + background: transparent; + } + &:focus { + background: var(--primary-low); } } &.close { @@ -320,10 +328,13 @@ .d-icon { color: var(--primary-high); } - @include hover { - background: transparent; - .d-icon { - color: var(--primary); + .discourse-no-touch & { + &:hover, + &:focus { + background: transparent; + .d-icon { + color: var(--primary); + } } } }