mirror of
https://github.com/LukeHagar/unicorn-utterances.git
synced 2025-12-06 04:21:55 +00:00
use a:focus-visible instead of a:focus to fix confusing click behavior
This commit is contained in:
@@ -91,7 +91,7 @@
|
|||||||
// click will follow the anchor href, so the "Copy link"
|
// click will follow the anchor href, so the "Copy link"
|
||||||
// button should not be displayed
|
// button should not be displayed
|
||||||
@supports selector(:has(*)) {
|
@supports selector(:has(*)) {
|
||||||
:global(.heading-linked):has(a:hover, a:focus) {
|
:global(.heading-linked):has(a:hover, a:focus-visible) {
|
||||||
.headingLink {
|
.headingLink {
|
||||||
opacity: 0 !important;
|
opacity: 0 !important;
|
||||||
}
|
}
|
||||||
@@ -133,7 +133,7 @@
|
|||||||
:global(.heading-linked):has(.headingLinkContainer:hover) {
|
:global(.heading-linked):has(.headingLinkContainer:hover) {
|
||||||
// The underline should not be applied if an inner <a> is focused
|
// The underline should not be applied if an inner <a> is focused
|
||||||
// as clicking will follow the link, not interact with the heading
|
// as clicking will follow the link, not interact with the heading
|
||||||
&:not(:has(a:hover, a:focus)) {
|
&:not(:has(a:hover, a:focus-visible)) {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user