Gatsby-plugin-image with tailwind CSS #32400
Unanswered
jeremy-blevins
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey Everyone,
I am running into an issue using Tailwind CSS with StaticImage as a background image. I am trying to make the image have an opacity of 50%, which works fine. However, I am unable to style the background of the image or image wrapper element. I have tried using the bg classes from Tailwind CSS and using the style prop with the backgroundColor values. However, the background color will only flash as the image loads and then disappears. I am able to get it to work by wrapping the image wrapper in another div and applying a background color to it. Am I misunderstanding something with the way Gatsby Image works? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions