Skip to content

Stylus

A CSS preprocessor for Node.js that lets you write styles in a shorter, more flexible syntax.

Stars
11.3k
Forks
1.1k
Licence
MIT
Language
JavaScript
Last update
1.5 years ago
Type
Dev tool

No commits in over a year — check for forks or alternatives before adopting.

What it is

Stylus is a CSS preprocessor written in JavaScript for Node.js. You write styles in its own compact language and it compiles them into regular CSS that browsers can read. Based on the repository description and topics, it is aimed at people who want more expressive, feature-rich styling code than plain CSS offers. The README was truncated, so this summary relies mainly on the project description.

  • Write stylesheets in Stylus syntax and compile them to CSS with Node.js
  • Use variables and reusable blocks to organize larger stylesheets
  • Integrate CSS compilation into a JavaScript project's build process

Great for

  • Node.js developers who already build front-end projects and want a CSS preprocessor
  • Front-end developers who prefer a terse, indentation-based style syntax
  • Teams that want to compile stylesheets as part of a Node.js build step

Not ideal for

  • People who only need standard CSS and no build step, since the output is still compiled CSS that needs a tool to produce it
  • Projects that need a preprocessor with a large ecosystem of tooling, which is not clear from the README provided
Step-by-step guide: how to use StylusInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Node.js

    Clone the repository

    git clone https://github.com/stylus/stylus
  2. 2

    Run it

    • Install Node.js
    • Install Stylus through npm, following the project documentation at https://stylus-lang.com
    • Write a .styl file and compile it to CSS using the Stylus command-line tool
  3. 3

    Get the most out of it

    • Read the official docs at https://stylus-lang.com for the full syntax and options
    • Use Stylus variables and mixins to reduce repetition in large stylesheets
    • Add compilation to your existing Node.js build scripts

Downloads

Strengths

  • MIT license, so it is free to use and modify
  • Long-running project with a large community (about 11,000 stars)
  • Written in JavaScript, which fits naturally into Node.js workflows

Trade-offs

  • The README provided was truncated, so detailed syntax and feature documentation could not be verified here
  • Latest release has no prebuilt binaries, so installation goes through Node.js tooling
  • Last push was April 2025, so maintenance activity should be checked before adopting it

How it compares

ProjectStarsTypeLevelUpdatedBest for
stylus (this)11.3kDev toolintermediate1.5 years agoNode.js developers who already build front-end projects and want a CSS preprocessor
sass15.4kOtherintermediate6 days agoDevelopers who want to read how specific Sass language features are defined
postcss29kDev toolintermediate4 days agoWeb developers who want to automate CSS fixes such as vendor prefixes
prettier52.4kDev toolbeginner4 days agoTeams that want one shared code style without writing their own rules
parcel44kDev toolbeginner4 days agoWeb developers who want a bundler that works without a config file
esbuild40.1kDev toolintermediate3 months agoDevelopers who want fast builds for JavaScript, TypeScript, or CSS projects

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.