tailwindlabs / tailwindcss-aspect-ratio

MIT License
972 stars 34 forks source link

Should this work with Tailwind 2.0 #3

Closed klickreflex closed 3 years ago

klickreflex commented 3 years ago

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.

thefubon commented 3 years ago

+1

firith commented 3 years ago

+1

cpauwels commented 3 years ago

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

elfeffe commented 3 years ago

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

adamwathan commented 3 years ago

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.

elfeffe commented 3 years ago

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 :)

MikeyBeLike commented 3 years ago

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')]

huntedman commented 3 years ago

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?