Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update .fill-current to also apply to path #148

Open
pixelastic opened this issue Aug 8, 2021 · 0 comments
Open

Update .fill-current to also apply to path #148

pixelastic opened this issue Aug 8, 2021 · 0 comments

Comments

@pixelastic
Copy link
Owner

The current .fill-current only changes the main color of an svg, and do not apply to path elements. I'm defining a custom color in my SVGs so they can be used as colored favicons

This is the code I'm using actually, but it should be part of the main Tailwind config.

/**
 * By default, we use the same svg file for the favicon and for the header. But
 * we might want to color them differently.
 * To color the favicon, we can set a custom `fill` attribute inside it, but to
 * be able to overwrite the color of in the website, we need to force
 * overwriting the path color
 **/
.fill-current path {
  @apply fill-current;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant