csstools/postcss-write-svg

Can configure the output style

yisibl opened this issue · 3 comments

If there is a quote in the url(), this format is better readability.

.foo {
  background-image: url('data:image/svg+xml;charset=utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="1px"><rect fill="#c8c7cc" x="0" y="0" w="100%" height="0.5"/></svg>')
}

Agreed. I’ll switch to this format.

If we use svg('foo') output url(''),
else if we use svg(foo) output url() .

This is now handled in v2.0.0