Skip to content

Instantly share code, notes, and snippets.

@corysimmons
Last active August 29, 2015 14:18
Show Gist options
  • Save corysimmons/9ecd5526460722badf41 to your computer and use it in GitHub Desktop.
Save corysimmons/9ecd5526460722badf41 to your computer and use it in GitHub Desktop.
Just a collection of reasons I think other preprocessors are weaker than Stylus.

Note All 3 preprocessors have a great community of very hard-working/helpful people.

Speed

  • Both Sass and LESS are incredibly slow to process - especially when you're looping over things. Stylus is instantaneous.

Sass Can't

  • perform basic math like exponents with decimals
  • perform string operations like split()
  • compile fast. it's insanely slow anytime you have to process anything at all.
  • watch @import'd files for changes (maybe it can but I haven't found a way to)
  • declare functions or mixins within other functions or mixins

Sass Requires You To

  • use ugly, curly-brace filled syntax
  • learn how to use Compass/Ruby just to polyfill Sass

Compass is a Pain

  • Compass docs are 404 http://compass-style.org/help/tutorials/command-line/
  • Most of Compass' default stylesheets are prefixing polyfills - totally useless with Autoprefixer. In fairness, Nib and countless other libs do this crap too.
  • Compass encourages you to use crap frameworks like Blueprint and by default generates a bunch of useless stylesheets
  • Creates poorly named dirs by default
  • Such bloat. It tries to perform so many CSS related things (e.g. generate a grid image to verify grid alignment..)
  • Requires you to interact with Ruby's ugliness
  • You can get some sweet BETA releases of some happening frameworks like YUI
  • The whole thing just feels like it's entirely ran by one guy who is overworked to death...

LESS is Actually Garbage

  • no rgba function (dat input/output doe)
  • no official CLI watcher, unofficial watcher outputs comments
  • can't call mixins at root level
  • docs are actually really pretty and easy to navigate - the best in the bunch
  • doesn't have if/else statements, you have to use some wacky Guard Expression syntax junk. they try to justify this with some crap about staying close to CSS' declarative blah blah blah but in practice it's completely confusing to everyone who has ever used a programming language
  • slow to compile like Sass. a bit faster than Sass though
  • You have to escape operators in calc() http://stackoverflow.com/a/14279520/175825 =[
    • LESS tries to parse everything in calc() so calc(99.99% * 1/3 - (30px - 30px * 1/3)); ends up being rendered as calc(13.33%);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment