♿️ Apply modern focus-within for keyboard submenus
This commit is contained in:
parent
0bb12c33b4
commit
d8f0c367de
1 changed files with 5 additions and 2 deletions
|
|
@ -44,7 +44,8 @@
|
||||||
border: none;
|
border: none;
|
||||||
transition: color 0.3s ease-in-out;
|
transition: color 0.3s ease-in-out;
|
||||||
}
|
}
|
||||||
.pt-menu__nav li:hover > a {
|
.pt-menu__nav li:hover > a,
|
||||||
|
.pt-menu__nav li > a:focus {
|
||||||
color: var(--pt-menu--color-highlight);
|
color: var(--pt-menu--color-highlight);
|
||||||
}
|
}
|
||||||
.pt-menu__nav li > a > i.pt-menu__icon {
|
.pt-menu__nav li > a > i.pt-menu__icon {
|
||||||
|
|
@ -68,7 +69,9 @@
|
||||||
transition: all 0.5s ease-in-out;
|
transition: all 0.5s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pt-menu__nav li.pt-menu__children:hover > .pt-menu__subs {
|
.pt-menu__nav li.pt-menu__children:hover > .pt-menu__subs,
|
||||||
|
.pt-menu__nav li.pt-menu__children > a:focus + .pt-menu__subs,
|
||||||
|
.pt-menu__nav li.pt-menu__children .pt-menu__subs:focus-within {
|
||||||
margin-top: 0.4rem;
|
margin-top: 0.4rem;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue