Repository navigation
tailwind.com: Tailwind CSS 4 in one executable file, no Node.js (unofficial) #20713
sntran
started this conversation in
Show and tell
Replies: 0 comments
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 all,
I built tailwind.com, an unofficial Tailwind CSS 4 compiler written in Rust. It is one file and needs no Node.js.
Try it first
The demo site runs a WebAssembly build of the compiler in your browser. You can write HTML and CSS, pick any Tailwind CSS 4 version from 4.0.0 up, and compare the output of two versions side by side. You can also compare my compiler against the official one for the same version. Each setup has a share link.
Why not the official standalone CLI?
I wanted one file that runs on more systems: Linux, macOS, Windows, FreeBSD, NetBSD and OpenBSD, on x86_64 and aarch64. I also wanted a drop-in replacement for Phoenix projects that use the Hex
tailwindpackage. It also ships as an npm package and a WebAssembly build.What it does
tailwindcssCLI (watch, minify, optimize, source maps)@pluginand@configwork, including the bundled forms, typography and aspect-ratio pluginsHow I check it
I followed the official code file by file. I compare my output to recorded output from the official compiler. The tests cover thousands of class candidates, real projects, source maps and plugins.
Speed
On a Phoenix project, I measured about 12 ms, against 139 to 186 ms for the official tools. The benchmark setup is in the docs, so you can run it yourself.
Limits
canonicalizecommandcryptoandstream) andIntlare not available to pluginsInstall
Or with npm:
I would like feedback, especially on cases where the output differs from the official tool. If you find one, please open an issue with the input.
All reactions