Closed lazd closed 7 years ago
SVG:
<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 10 8' enable-background='new 0 0 10 8' xml:space='preserve'><rect style="fill:var(--color,black)" width="100%" height="100%"/></svg>
CSS:
.square::after { content: url("embed/Check.svg" param(--color rgb(1,1,1))); }
Result:
.square::after { content: url("data:image/svg+xml;charset=utf-8,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 10 8' enable-background='new 0 0 10 8' xml:space='preserve'%3E%3Crect style='fill:black' width='100%25' height='100%25'/%3E%3C/svg%3E"); }
However, if blue or #FFF is passed, everything works as expected.
blue
#FFF
I'll send a PR that fixes this shortly.
SVG:
CSS:
Result:
However, if
blue
or#FFF
is passed, everything works as expected.I'll send a PR that fixes this shortly.