You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GatsbyImage css classes are overriding Tailwind aspect-ratio classes when deployed/built for prod. It works as expected in development. I'm not sure if this is the right place to post this, but it doesn't get fixed by setting important: true in tailwind config because aspect-ratio doesn't take on that directive. Would love some advice!
It sounds to me like Gatsby is including the CSS in a different order in production than it is in development, which is definitely an issue since CSS order impacts which styles "win".
Glad you found a workaround that works for you — unfortunately I don't think there's anything we can do to change the behavior of Gatsby here and the real fix would be fixing what is causing Gatsby to include the CSS in a different order in different environments.
What version of @tailwindcss/aspect-ratio are you using?
v0.3.0
What version of Node.js are you using?
v16.9.1
What browser are you using?
Chrome
What operating system are you using?
macOS
Reproduction repository
https://github.com/hisnameisjimmy/gatsby-plugin-image-tailwind-specificity
Describe your issue
GatsbyImage css classes are overriding Tailwind aspect-ratio classes when deployed/built for prod. It works as expected in development. I'm not sure if this is the right place to post this, but it doesn't get fixed by setting
important: true
in tailwind config because aspect-ratio doesn't take on that directive. Would love some advice!You can see the issue in the following screenshots or by visiting this example site: https://inspiring-hamilton-bd685d.netlify.app/
The text was updated successfully, but these errors were encountered: