Support extracting classes from any file like `@tailwindcss/jit` / `purgecss` do
See original GitHub issueHi!
Just trying out windicss. It seems like windicss currently only extracts classes between class="..."
. I use Tailwind with a variety of stacks which don’t have the same class syntax as HTML. @tailwindcss/jit
and purgecss
both blindly scan for anything that looks like a class and compile that. Is it possible to do that in windicss?
Example:
$ echo 'here text-red-600 are some opacity-50 classes' > a.txt
$ windicss a.txt -to a.css
a.css
does not include text-red-600 or opacity-50 while @tailwindcss/jit
does with the appropriate purgecss config.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
PurgeCSS and Tailwind CSS, how to preserve responsive ...
It provides a default extractor that is working fine with a wide variety of file types, but it can be limited and does...
Read more >Tailwind JIT and Hugo Purge issues
My current setup is purging CSS styles using the Hugo stats file. When I tried to purge the CSS using the tailwind.config.js file,...
Read more >Extracting TailwindCSS from HTML - DevDojo
Page with inline Tailwind Classes. To extract the classes I want to use, I will first need to install the PurgeCSS CLI: npm...
Read more >Using the Tailwindcss/jit Compiler with Phoenix - Elixir Forum
I have set up Tailwindcss for a Phoenix (v 1.5.8, so using Webpack, Liveview and Surface) project successfully and tried to switch to...
Read more >Test driving @tailwindcss/jit. SPOILER: It's great
I've looked over them, and I'll be able to move all of them into css classes, additionally, with better mobile support. It looks...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
https://github.com/windicss/windicss/commit/4e386bbb0d3bd8e54d908790ee9b677479f96ac7 support fuzzy match.
https://github.com/windicss/windicss/commit/c85d088c6e65a8702e5426b3e508fa6565623ee2 support extractors.
Yeah, you can migrate the part of code that extracts classNames. You can put that into utils or helpers folder.