Styling

Modern.js has built-in a variety of commonly used CSS solutions, including Less / Sass / Stylus preprocessors, PostCSS, CSS Modules, CSS-in-JS, and Tailwind CSS.

Using Less, Sass and Stylus

Modern.js has built-in popular community CSS preprocessors, including Less and Sass.

By default, you don't need to configure Less and Sass. If you have custom loader configuration requirements, you can set them up by configuring tools.less and tools.sass.

You can also use Stylus in Modern.js by installing the Stylus plugin provided by Rsbuild. For usage, please refer to Stylus Plugin.

Using PostCSS

Modern.js has built-in PostCSS to transform CSS code.

Please refer to Rsbuild - Using PostCSS for detailed usage.

Using Uno CSS

Please read the Rsbuild - Using UnoCSS for detailed usage.