css preprocessors - weakish/cheat GitHub Wiki

Sass vs. LESS vs. Stylus

Actually this is "Why I prefer Stylus over Sass and Less".

Stylus is flexible with brackets and semi-colons.

Variables are prefixed with $ it Sass and @ in Less. Stylus variables does not requires $ like most programming languages.

Mixins in Stylus and Less are just like functions. Mixins in Sass require @mixin and @include. This is verbose.

LESS doesn't truly support inheriting styles like Sass and Stylus. You can uses mixins for this, but properties are repeated in compiled CSS.

Property lookup is supported in Stylus:

p
  margin 1em
  padding (@margin / 2)

Sass allows a special nesting rule:

font:
  size: 1em
  weight: bold

This rule is clever but:

  • It overloads the syntax for nested selectors. And IMO using the same visual form for two distinct semantic things is confusing.
  • You can use auto complication in editors and IDEs so this does not save typing.
  • It omits prefix- but adds nesting, so it is not necessarily more concise.