Menu List Item - hover active state does not work if using elements
See original GitHub issueI have a component like this.
<Menu
className="share-admin-menu"
style={{
backgroundColor: 'white',
padding: '20px',
color: 'white',
width: '200px',
}}
>
<Menu.List title={username} className="share-admin-menu__title">
<Menu.List.Item
active={active === 'edit'}
onClick={this.onEditClick}>
<div className="share-admin-menu__edit-container mb-one">
<p className="share-admin-menu__text-option">
Edit
</p>
<Icon
className="debut-icon debut-icon--pointer ml-one"
icon="IconPencil"
color="#518DCA"
/>
</div>
</Menu.List.Item>
<Menu.List.Item
active={active === 'delete'}
onClick={this.onDeleteClick}>
<div className="share-admin-menu__delete-container mb-one">
<p className="share-admin-menu__text-option">Delete</p>
<Icon
className="debut-icon debut-icon--pointer ml-one"
icon="IconTrash"
color="#EA1D64"
/>
</div>
</Menu.List.Item>
<Menu.List.Item
active={active === 'detail'}
onClick={this.onFollowersClick}>
<div className="share-admin-menu__go-to-container">
<p className="share-admin-menu__text-option">Go to Share</p>
<Icon
className="debut-icon debut-icon--pointer ml-one"
icon="IconGo"
color="#3ac569"
/>
</div>
</Menu.List.Item>
</Menu.List>
</Menu>
which renders out this…
Visually it looks good but i lose the ability of the hover and active state. Is there a work around for this?
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
List item `li:hover` is not working - Stack Overflow
Can anyone tell me what's wrong with my code below? I'm trying to make the menu show the list when hover over each...
Read more >States | Webflow University
The pressed or active state is the state that shows when you click or press on an element. This state inherits styles from...
Read more >Menu Styling | Web Accessibility Initiative (WAI) - W3C
Change hovered or focused menu items, which gives users visual guidance when navigating the menu. In this example, hover and focus states use...
Read more >Click Instead of Hover: A CSS-only "Clicky" Menu - getButterfly
Hover is not consistent; Hover is not accessible; Hover is inefficient; Peripheral items are harder to click; Click menus considerations.
Read more >CSS Hover Not Working: How to Resolve Hover Problems
However, the problem arises when the hover state either shows or hides another element through visibility or display properties in CSS.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@MrCreeper1008 In the meantime ill do that 😃 thanks!
@kkomaz the behavior you are having problems with is actully a default in bulma (You can check it out here), and this library has nothing to do with it. You must wrap an
a
tag around any content inside the list item. That said, it would be better if this library would do the wrapping for you. I’ll make a PR in my free time.Edit: If the sandbox does not work for you, refresh the preview and it’ll work again.