I recently had a ticket to make the bell "fill in" when the user's mouse hovers over it. My options were:
Notification.svg to Notification_filled_in.svg..svgStyle {
height: 200px;
width: 200px;
stroke: blue;
fill: black;
transition: 3s all ease;
}
.svgStyle:hover {
stroke: yellow;
fill: black;
}
As you can probably guess, I chose the second option. Here's how to make SVGs compatible with that.
Problems:
Fill attribute (black) should change color of the inside of the shape, not the inside of the line.Stroke attribute (blue, then yellow on hover) should be an outline of the whole shape, not just the outline of the lines in the SVG.stroke, the width of the SVG exceeds the width of the viewbox.Solutions:
fill correctly. This should be under "fills" in the UI.stroke correctly. This should be under "borders" in the UI.height and width of the final SVG,stroke (called "outline" in the UI) will not go outside of the viewbox,fill="someColor" or stroke="someColor". If you see those, just delete them and re-save the file.