5 ms·
There is no good way to solve it using Tailwind classes alone. You could parse the markup first and add Tailwind classes before rendering them, but that is too
by jasim 7y ago
There is no good way to solve it using Tailwind classes alone. You could parse the markup first and add Tailwind classes before rendering them, but that is too much pain for very little reward.
The best trade-off I've found is to give a unique CSS classname for the container which has user-generated content, and then style it using nested selectors. Here you can use Tailwind's @apply so you're still able to rely on Tailwind's design system.
- dinkleberg 7y agoYeah I definitely considered the parsing method, but that is definitely too much work there. I didn't consider using the @apply, good idea. I'll have to give that a go, thanks!