Skip to content

Commit 8cae8a0

Browse files
committed
fix: enhance focus styles for better accessibility and user interaction
1 parent 0100a01 commit 8cae8a0

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

dist/index.html

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,11 @@
655655
transition-delay: 50ms, 200ms;
656656
/*box-shadow: inset 0 0 0 1px var(--onBg);*/
657657
}
658+
659+
&:focus {
660+
outline: 1px solid var(--onBg);
661+
outline: none;
662+
}
658663
}
659664

660665
.l-wrap {
@@ -901,21 +906,25 @@
901906
}
902907
&:hover {
903908
box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.2),
909+
0 0 0 1px var(--c1),
904910
0 0 0 2px var(--bg);
905911
}
906912

907913
&:active {
908-
box-shadow: inset 0 0 0 1px var(--c0),
914+
box-shadow: inset 0 0 0 1px var(--onBg),
915+
0 0 0 2px var(--c1),
909916
0 0 0 1px var(--bg);
910917
}
911918
}
912919
}
913920

914-
.code-example:hover > button {
921+
.code-example:hover > button,
922+
.code-example:focus-within > button {
915923
opacity: 1;
916924
transform: translateY(-50%);
917925
transition-delay: 0.05s, 0s, 0.1s;
918926
color: var(--onBg);
927+
outline: none;
919928
}
920929
.code-ex {
921930
position: relative;
@@ -1089,7 +1098,8 @@
10891098
margin-left: -0.4em;
10901099
margin-top: -0.2em;
10911100
}
1092-
.kofi:hover img {
1101+
.kofi:hover img,
1102+
.kofi:focus img {
10931103
animation: shakeup 0.5s ease;
10941104
}
10951105
.kofi img {

0 commit comments

Comments
 (0)