Back to topics

Handling SVG

Sometimes, SVG slices downloaded from design tools like Blue Lake may contain unnecessary content. They generally need simple processing; it's not recommended to use them directly.

Simplifying Attributes

For example, the id attribute often contains Chinese descriptions in SVGs; such attributes can be removed.

Do Not Hardcode Colors

If the SVG includes a fill attribute, the icon's color will be hardcoded. You should change the fill attribute in the SVG to currentColor.

This way, the icon's color can be customized via CSS.