-1

I want to get only the css part of tailwind. Admin can write an article and use all Telwind classes in his article. On the other hand, Tailwind classes are created during the build of the React project, so the admin may use a class that has not been created in Build time. For this reason, it is necessary to load the Tailwind CDN only on the article page in order to display the full article as correctly. When the CDN is loaded, there is an interference because in the main project, many items of the tailwind configuration have been edited. Now I only need to get CSS from tailwind so that maybe there is an idea to solve the problem. Do you have an idea to solve the problem?

2

1 Answer 1

1

It's not recommended to use Tailwind via a CDN, but there are a couple of ways to make it work.

For Tailwind 2 you can pull in the full CSS file from a CDN. However, it will include much more than what you actually use and can't be customized.

Tailwind 3 offers the "Play CDN" which will generate styles on demand as it discovers classes in the DOM. It's meant for development and the developers recommend against using it in production.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.