Replies: 2 comments
-
|
You can use Then, I think you might need to verify which of these candidates would be Tailwind class names. If you do, then perhaps this logic is somewhere in Defined here: tailwindcss/packages/tailwindcss/src/index.ts Lines 836 to 847 in 7971167 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Thats interesting thanks |
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.
-
Hi,
I'm currently in the process of trying to write some Blazor (Csharp) / Leptos (Rust) component libraries using tailwind.
Ideally what I'd like is a feature that can be used to just generate a list of detected tailwind class names without generating the full css
Currently there's a way to do this using tailwindcss-mangle's extract mode
But I was wondering if there was a more "native" method to do this under Tailwind 4 using an API or built in feature
The reason for wanting this feature is situations where there are multiple native libraries (non js) that use tailwind
but the actual tailwind css and theme is generated in the final consuming project.
So for example
Razor class library that contains buttons, using tailwind to style the buttons
A tool or script extracts the used tailwind classes into a text file bundled with the library
Razor class library that contains something else, lets say badges, using tailwind to style the badges
A tool or script extracts the used tailwind classes into a text file bundled with the library
Final consuming project which contains both of the above via csproj references.
The generated text files from each of the libraries is included into the build directory
Tailwind is used to generate any css needed along with customising the theme
it also picks up on the text files bundled in from the referenced projects so also generates css for those libraries at the same time.
I've had a dig around for similar questions but there's a lot in the discussions section
Beta Was this translation helpful? Give feedback.
All reactions