Highlighting icon in MenuItem on :hover
This commit is contained in:
parent
e176173730
commit
b50e79ae4d
1 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue