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?
-
Hellow there, even though your question is not clear here is what i think should help implementing what you want. tailwindcss.com/docs/configuration#prefix– Milan PatelMar 8 at 18:00
-
Using Tilwind cdn on a site built with Tilwind (without cdn)– Mohammad Reza ZolfaghariMar 8 at 18:04
1 Answer
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.