discuss icon indicating copy to clipboard operation
discuss copied to clipboard

SVG different fill and stroke colors

Open t1mtw0 opened this issue 5 years ago • 2 comments

I am currently trying to make an SVG, with the wrapper being:

<svg height="250" width="200" class="stroke-current stroke-2 text-white fill-current text-transparent">
    <!-- SVG Icon -->
</svg>

Currently for SVGs, the only possible classes for fill and stroke are .stroke-current and .fill-current, and the colors are implemented using text color classes. The problem is when I need to have them as different colors, and there is no way to have two different colors that correspond with the current for either fill or stroke.

Is there some way to customize it so that this would work? Am I missing something?

t1mtw0 avatar Feb 12 '20 02:02 t1mtw0

I am facing the same issue.

fnick851 avatar Mar 04 '20 00:03 fnick851

Not possible from the CDN, but both fill and stroke colors can be customized through the config. Check out customizing section on the utility pages: https://tailwindcss.com/docs/stroke/#customizing https://tailwindcss.com/docs/fill/#customizing https://tailwindcss.com/docs/configuration

tlgreg avatar Mar 04 '20 10:03 tlgreg