Highlighting icon in MenuItem on :hover

This commit is contained in:
DarkCat09 2023-07-25 09:54:38 +04:00
parent e176173730
commit b50e79ae4d

View file

@ -15,7 +15,7 @@ const { name, link, icon, atLeft = true } = Astro.props;
<slot name="js-dataset"></slot>
<a href={link}>
{!atLeft ? name : ""}
<span class:list={["icon-wrapper", {"highlight-icon": name == ""}]}>
<span class="icon-wrapper">
<Icon code={icon} />
</span>
{atLeft ? name : ""}
@ -37,8 +37,10 @@ const { name, link, icon, atLeft = true } = Astro.props;
font-size: 1.5rem;
color: var(--fg-sec);
}
&.highlight-icon:hover {
li:hover {
.icon-wrapper {
color: var(--fg);
}
}