Aspect ratio plugin: Add note about safelist for aspect classes? #15032
jamesmacwhite
started this conversation in
Ideas
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.
Uh oh!
There was an error while loading. Please reload this page.
-
It might be me, being new to tailwind, but I was smacking my head against the wall for a while thinking the plugin wasn't working, when in fact it was, but the aspect classes where being generated from a dynamic source i.e. database.
I needed to the aspect- class prefix to the safelist configuration to avoid it being stripped and not showing up most of the time.
A note in the README, given this might be a use case more common, i.e. a field containing data being wrapped with the aspect classes.
In relation to: https://github.com/tailwindlabs/tailwindcss-aspect-ratio
Fully acknowledging that this is well documented in the main docs: https://tailwindcss.com/docs/content-configuration#safelisting-classes but I didn't make the connection for a while, until I started testing outside of dynamic template driven by fields/database.
Beta Was this translation helpful? Give feedback.
All reactions