From 8da4cde41307d69c09e0470036da11d7d88237f3 Mon Sep 17 00:00:00 2001 From: tobiasnitsche <43043989+tobiasnitsche@users.noreply.github.com> Date: Mon, 26 Jun 2023 14:53:56 +0200 Subject: [PATCH 1/2] Added :focus-within for .table-hover class Adds the css state :focus-within to .table-hover, to keep the hover state visually. --- scss/_tables.scss | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scss/_tables.scss b/scss/_tables.scss index ebfc00a5c6..9050302d0c 100644 --- a/scss/_tables.scss +++ b/scss/_tables.scss @@ -138,13 +138,12 @@ // Placed here since it has to come after the potential zebra striping .table-hover { - > tbody > tr:hover > * { + > tbody > tr:hover, tr:focus-within > * { --#{$prefix}table-color-state: var(--#{$prefix}table-hover-color); --#{$prefix}table-bg-state: var(--#{$prefix}table-hover-bg); } } - // Table variants // // Table variants set the table cell backgrounds, border colors From 5de9a9a67e426d8a7095a4de39a3c7dba14b72cc Mon Sep 17 00:00:00 2001 From: tobiasnitsche <43043989+tobiasnitsche@users.noreply.github.com> Date: Mon, 26 Jun 2023 16:05:57 +0200 Subject: [PATCH 2/2] Update _tables.scss Scss selector fix --- scss/_tables.scss | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scss/_tables.scss b/scss/_tables.scss index 9050302d0c..f43ce4936c 100644 --- a/scss/_tables.scss +++ b/scss/_tables.scss @@ -138,9 +138,14 @@ // Placed here since it has to come after the potential zebra striping .table-hover { - > tbody > tr:hover, tr:focus-within > * { - --#{$prefix}table-color-state: var(--#{$prefix}table-hover-color); - --#{$prefix}table-bg-state: var(--#{$prefix}table-hover-bg); + > tbody { + > tr:hover, + > tr:focus-within { + > * { + --#{$prefix}table-color-state: var(--#{$prefix}table-hover-color); + --#{$prefix}table-bg-state: var(--#{$prefix}table-hover-bg); + } + } } }