Repository navigation
Releases
Releases · Ynitial/tailwindcss-chain
v1.1.0
Laravel Blade Support
Added
- Laravel Blade setup guide in README, CLAUDE.md, and llms.txt documenting the Blade precompiler approach
- GitHub topics:
laravel,blade,laravel-blade,tailwind-variants
Laravel Blade
Blade templates bypass Vite's transform pipeline (Tailwind reads them from disk, Laravel renders them server-side). This release documents the Blade precompiler solution:
Blade::precompiler(function (string $content) {
return preg_replace_callback(
'/((?:(?:[\w-]+|\[[^\]]*\]):)+)((?:[^\s\'"|]+\|)+[^\s\'"|]+)/',
function ($matches) {
$prefix = $matches[1];
$utilities = explode('|', $matches[2]);
return implode(' ', array_map(fn ($u) => $prefix . $u, $utilities));
},
$content
);
});Add this to your AppServiceProvider::boot() and run php artisan view:clear.
v1.0.0
Initial Release
Vite plugin that lets you chain multiple Tailwind CSS utilities under a shared variant prefix using pipe (|) syntax.
Features
- Pipe syntax:
md:hover:bg-blue-600|text-white|scale-105expands tomd:hover:bg-blue-600 md:hover:text-white md:hover:scale-105 - Stacked variants: Works with
md:hover:,dark:md:,md:max-lg:, etc. - Arbitrary variants:
[&>div]:text-red|font-boldexpands correctly - Bracket-aware parsing: Pipes inside
[](arbitrary values) are left untouched - Zero runtime cost: All expansion happens at build time via Vite's
enforce: 'pre'transform - Broad file support:
.js,.jsx,.ts,.tsx,.html,.vue,.svelte,.astro,.md,.mdx,.blade.php,.php - CI: GitHub Actions testing on Node 18, 20, and 22