This article explains why your svg or icon may not render correctly with Combostrap and brings two solutions.
If the icon that you are using is from one of our supported icon library, contact us or create a ticket
If your icon or svg does not render correctly, this is ultimately caused by a styling issue because ComboStrap suppress them by default with the svg optimization (along with all class attributes).
By default, a icon or any svg should not use the css style element because:
Below, you can see examples of such icon:
If you put this two icon on a page, the second will be a blank square 1) because:
We allows a user to change the color for any icon. If there was any style, it would not be possible because there would be a conflict between:
The first solution is to change your svg file by replacing any style attribute or element by the corresponding svg painting attribute that are:
Example:
<defs>
<style>.cls-1{fill:#fff;}</style>
</defs>
<path class="cls-1">
<path fill="#fff">
If you are sure that the style will not leak and that you want to preserve them, you can add the preserve attribute.
It will:
Example:
<icon name="carbon:logo-tumblr" preserve="style"/>
{{:combostrap:icons:carbon:logo-tumblr.svg?24&preserve=style}}
It will preserve the style but also the class and id attributes.