Remove oblong background from material design icon
Briefly

To eliminate the stadium background that appears on hover for a Material Design icon, you can achieve this with CSS. Specifically, set the hover background color to be the same as the widget's color. To keep the circular icon centered, apply flexbox properties or adjust the icon’s display attributes. This approach allows for precise control over the visual appearance and placement, enhancing user experience in NiceGUI by giving the interface a cleaner look without unwanted hover effects.
To remove the stadium background from the material design icon, set the hover background color to match the parent widget's background using CSS. This can be done by selecting the icon's hover state.
Ensure that the icon itself is displayed as a block element and has the correct alignment properties. You might want to set the 'display' property to 'flex' and align it centrally within the container.
Using CSS, you can manipulate the 'background-color' on hover directly within a pseudo-class to achieve desired styling without affecting the icon itself.
Consider using specific CSS rules, like padding, to ensure the icon retains its position while the hover effect is customized to eliminate the stadium effect.
Read at SitePoint Forums | Web Development & Design Community
[
|
]