-
Hello, I'm just digging into Tailpress and noticed that Tailwindcss classes don't work when adding the HTML in the text editor on individual Wordpress pages. When I add the HTML to the custom page-template.php file the styles are compiled. What's the trick to have the classes work for HTML on individual pages? Thanks! B |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Not sure if I understand your question, but are you using Tailwind classes inside the block editor? In that case: the JIT editor of Tailwind won't pick up classes that are typed in to your WordPress block editor, because it only keeps classes that are found in the files you specify in the https://tailwindcss.com/docs/content-configuration#safelisting-classes TailPress uses a safelist.txt file for this. https://github.com/jeffreyvr/tailpress/blob/master/safelist.txt |
Beta Was this translation helpful? Give feedback.
Not sure if I understand your question, but are you using Tailwind classes inside the block editor?
In that case: the JIT editor of Tailwind won't pick up classes that are typed in to your WordPress block editor, because it only keeps classes that are found in the files you specify in the
content
option. So if you wan't to use classes inside the editor, you would have to add them to the safelist so they are not purged.https://tailwindcss.com/docs/content-configuration#safelisting-classes
TailPress uses a safelist.txt file for this.
https://github.com/jeffreyvr/tailpress/blob/master/safelist.txt