Docs: Theme Config and tailwind (safelist issue) #2663
Unanswered
jamesmacwhite
asked this question in
General
Replies: 1 comment
-
|
I might do some experimenting with this to see if you can include a reference to the PHP class, which would be neat. But possibly not an option as the Tailwind purge will be unable to recognise the pattern of classes as a PHP array. But yeah, a valid point - I suppose I'll make a note of it somewhere! |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
For Theme Config and adding tailwind utility classes using plugin config, for tailwind, you are likely to encounter issues with the styling/CSS output of the utility classes not being applied because Tailwind will strip CSS not present in the final output.
By adding via PHP, the classes won't be seen e.g.
text-red-600, because it is not part of the rendered template itself, but injected at a layer beyond the tailwind compilation. Adding via Twig will likely have more success, given this is at render time.I don't know if it's worth adding a note about this somewhere, just in case others chase this. The safelist is always a gotcha with tailwind. You can of course target the .fui classes with the
@applyin a tailwind CSS file, but just thought it was something to note for consideration!Beta Was this translation helpful? Give feedback.
All reactions