From 0ef49471ed970cd5d55cedccbf1d8188777364fc Mon Sep 17 00:00:00 2001 From: Denis Date: Fri, 21 Mar 2025 10:47:42 -0700 Subject: [PATCH] CSS fix: prevent underlining when hovering buttons within links (#8311) Signed-off-by: Denis FL --- packages/theme/styles/_layouts.scss | 22 +++++++++++++------ .../src/components/HelpAndSupport.svelte | 1 + 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/packages/theme/styles/_layouts.scss b/packages/theme/styles/_layouts.scss index 39f34d0b75..e4aca2a567 100644 --- a/packages/theme/styles/_layouts.scss +++ b/packages/theme/styles/_layouts.scss @@ -21,26 +21,34 @@ a { text-decoration: none; color: var(--theme-content-color); outline: none; + &:hover { color: var(--theme-caption-color); - text-decoration: underline; + + &:not(:has(button)):not(.stealth):not(.no-underline) { + text-decoration: underline; + } } + &:active { color: var(--theme-content-color); - text-decoration: underline; + + &:not(:has(button)):not(.stealth):not(.no-underline) { + text-decoration: underline; + } } - &:visited { color: var(--theme-content-color); } - - &.stealth, - &.no-underline { - &:hover, &:active { text-decoration: none; } + + &:visited { + color: var(--theme-content-color); } + &.stealth { display: inline-flex; align-items: center; width: 100%; } } + button { display: flex; justify-content: center; diff --git a/plugins/workbench-resources/src/components/HelpAndSupport.svelte b/plugins/workbench-resources/src/components/HelpAndSupport.svelte index dfcb10266b..fe6e57b671 100644 --- a/plugins/workbench-resources/src/components/HelpAndSupport.svelte +++ b/plugins/workbench-resources/src/components/HelpAndSupport.svelte @@ -246,6 +246,7 @@ align-items: flex-end; margin: 0 0.5rem 0.5rem; padding-top: 0.625rem; + gap: 0.25rem; } .key-box { padding: 0 0.5rem;