Tailwind CSS in Grav, No Node Required
Grav · July 31, 2026
About this announcement
Typhoon has been a Tailwind CSS theme since 2022, and Helios was built on Tailwind 4 from day one. Both of them are lovely to work on, right up until the moment you want to change a single class in a Twig template on a live server. Then you need Node. You need node_modules, you need npm install, you need to remember which script builds the CSS, and you need all of that on a box whose whole reason for running Grav is that it's just PHP and a folder of files. That has bugged me for a long time. So we built the Tailwind4 plugin, and it compiles a theme's Tailwind CSS from PHP. No Node, no npm, no build step, no package.json. You click a button in the admin and 88 milliseconds later the CSS is on disk. What it actually does The plugin has three ways in, and they all do the same work: A Compile CSS button in the Admin Next toolbar, with a toast reporting the duration, output size, or the error if the build failed. bin/plugin tailwind4 compile [theme] on the CLI, with --watch for polling and recompiling while you edit, and --diff for comparing against the official Node build. Two API endpoints, POST /api/v1/tailwind4/compile and GET /api/v1/tailwind4/status, gated to theme administrators and super admins. There's also an optional Auto-compile on Save, off by default, that recompiles when you save the active theme's config. The one thing it never does is compile on a front-end request. The output is a plain static CSS file at the exact path your npm build already wrote to, build/css/site.css, so your templates need zero changes and the PHP build is a drop-in replacement. You can flip back and forth between the two builds all day. Here's the report page after a Typhoon build on my machine: 290 files scanned, 289 of them served from cache, 11,604 class candidates, 75.3KB of minified CSS, 88ms end to end with 54ms of that inside the engine, peaking at 44MB of memory. That's fast enough that clicking the button feels instant, which was the whole point. Under the covers Ther
Read Full Story