I am quite lame with CSS, but noticed something about this helper.
var classname = component.get("v.class");
var containerClassName = [
prefix+"icon__container",
prefix+"icon-"+category+"-"+name,
classname
].join(' ');
var iconClassName = prefix+"icon "+prefix+"icon--" + size;
component.set("v.containerClass", containerClassName);
var svgroot = document.createElementNS(svgns, "svg");
svgroot.setAttribute("class", iconClassName);
As you can see, SVG element class is actually generated for you, while in component itself it says:
<aura:attribute name="class" description="the class of this SVG tag, can be use for CSS purpose" />
<aura:attribute name="containerClass" description="Container class name for span container of icon" />
So if I put something like:
<c:svg svgPath="/resource/SLDS0102/assets/icons/utility-sprite/svg/symbols.svg#delete"
category="utility" name="delete" class="slds-button__icon" />
It won't actually be visible on my screen. classname is actually getting sent on the container.
Is this correct or do just don't know how to set the styles correctly?