Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

SVG different fill and stroke colors #449

Open
t1mtw0 opened this issue Feb 12, 2020 · 2 comments
Open

SVG different fill and stroke colors #449

t1mtw0 opened this issue Feb 12, 2020 · 2 comments

Comments

@t1mtw0
Copy link

t1mtw0 commented Feb 12, 2020

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?

@fnick851
Copy link

fnick851 commented Mar 4, 2020

I am facing the same issue.

@tlgreg
Copy link

tlgreg commented Mar 4, 2020

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants