tailwindlabs/tailwindcss-aspect-ratio

Should this work with Tailwind 2.0

klickreflex opened this issue · 8 comments

After upgrading to Tailwind 2.0 it seems that this plugin doesn't produce any classes anymore. Only me? I'm on the PostCSS compatibility version of tw2.0.

+1

+1

I'm having the same issue @adamwathan, and I'm also on the compatibility version of tw2.0

I'm breaking my head asking why I can't get it to work, I'm using TW2 too

Works perfectly fine with Tailwind 2, here's a project that demonstrates it:

https://github.com/adamwathan/tailwind-2-aspect-ratio

Please provide an actual reproduction of the problem if you are having a problem, it is impossible to help without seeing your code.

Thank you @adamwathan

I see know that the mistake was that I had
aspectRatio: {
none: 0,
square: [1, 1],
"16/9": [16, 9],
"4/3": [4, 3],
"21/9": [21, 9]
}

On my tailwind.config.js
But that's from another plugin :)

Also had this issue, seemed to work after rearranging order of another plugin.
plugins: [require('@tailwindcss/forms'), require('@tailwindcss/aspect-ratio')]
to this ->
plugins: [require('@tailwindcss/aspect-ratio'), require('@tailwindcss/forms')]

Also had this issue, seemed to work after rearranging order of another plugin.
plugins: [require('@tailwindcss/forms'), require('@tailwindcss/aspect-ratio')]
to this ->
plugins: [require('@tailwindcss/aspect-ratio'), require('@tailwindcss/forms')]

This resolved my issue aswell!
aspect-w-16 and aspect-h-9 returned a div with height 0.
After rearranging, everything works. Perhaps it's a bug?