A Svelte Preprocessor to compile windicss at build time.
The svelte-windicss-preprocess
is a preprocessor for Svelte applications specifically designed for integration with Windi CSS, a utility-first CSS framework. Similar to Tailwind CSS, Windi CSS aims to provide a faster and more efficient alternative, fully compatible with Tailwind CSS v2.0, while also introducing additional features. This preprocessor allows developers to seamlessly incorporate Windi CSS into their Svelte projects.
To install the svelte-windicss-preprocess
preprocessor and integrate it with your Svelte project, follow these steps:
Ensure that you have Windi CSS and Tailwind CSS installed in your project:
npm install -D windicss@next tailwindcss
Install the svelte-windicss-preprocess
preprocessor:
npm install -D svelte-windicss-preprocess
Configure the preprocessor in your Svelte project’s svelte.config.js
file:
const preprocess = require('svelte-preprocess');
const windicssPreprocess = require('svelte-windicss-preprocess');
module.exports = {
preprocess: [
preprocess({
// your existing preprocess configuration
}),
windicssPreprocess(),
],
};
Start using Windi CSS in your Svelte components:
<style>
/* Use Windi CSS classes as you would with Tailwind CSS */
.container {
@apply bg-blue-500 text-white;
}
</style>
The svelte-windicss-preprocess
is a preprocessor that enables seamless integration of Windi CSS, a utility-first CSS framework, within Svelte applications. It offers a faster and more efficient alternative to Tailwind CSS, while maintaining full compatibility with Tailwind v2.0. With additional features and easy installation, this preprocessor provides developers with a powerful tool for styling their Svelte projects.