stylus
TLDR
Compile Stylus file to CSS
SYNOPSIS
stylus [options] [file|dir...]
DESCRIPTION
stylus is a command-line compiler for the Stylus CSS preprocessor. Stylus is an expressive, dynamic CSS language built for Node.js that features flexible syntax, powerful functions, and robust feature set.
The compiler transforms Stylus source files (.styl) into standard CSS. Stylus syntax is flexible, allowing optional colons, semicolons, and braces, making stylesheets more readable. It supports variables, mixins, functions, iteration, and many other features that extend CSS capabilities.
The watch mode enables automatic recompilation during development. Source maps aid debugging by mapping compiled CSS back to original Stylus sources. The CSS conversion feature helps migrate existing stylesheets to Stylus.
PARAMETERS
-o, --out dir
Output to specified directory or file.-w, --watch
Watch files for changes and recompile.-c, --compress
Compress CSS output.--css input output
Convert CSS to Stylus format.-m, --sourcemap
Generate source map files.-l, --line-numbers
Add line number comments to output.-i, --interactive
Start interactive REPL.-U, --inline
Inline images as data URIs.-u, --use plugin
Use specified plugin.-I, --include path
Add path to import lookup.--import file
Import file before compiling.-p, --print
Print compiled CSS to stdout.--prefix prefix
Add vendor prefixes.-V, --version
Display version.-h, --help
Display help.
CAVEATS
Requires Node.js and npm for installation. The flexible syntax can be confusing for teams without consistent conventions. Performance may be slower than other preprocessors for large projects. Stylus has less community adoption compared to Sass/SCSS.
HISTORY
Stylus was created by TJ Holowaychuk (creator of Express.js) and released in 2010. It was designed to be more expressive and flexible than existing CSS preprocessors. While it gained significant adoption, Sass/SCSS eventually became more dominant in the CSS preprocessor ecosystem.


