Need advice about which tool to choose?Ask the StackShare community!

Mustache

1.6K
348
+ 1
50
Sass

30.1K
21.6K
+ 1
3K
Add tool

Mustache vs Sass: What are the differences?

What is Mustache? Logic-less templates. Mustache is a logic-less template syntax. It can be used for HTML, config files, source code - anything. It works by expanding tags in a template using values provided in a hash or object. We call it "logic-less" because there are no if statements, else clauses, or for loops. Instead there are only tags. Some tags are replaced with a value, some nothing, and others a series of values.

What is Sass? Syntactically Awesome Style Sheets. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.

Mustache and Sass are primarily classified as "Templating Languages & Extensions" and "CSS Pre-processors / Extensions" tools respectively.

"Dead simple templating" is the primary reason why developers consider Mustache over the competitors, whereas "Variables" was stated as the key factor in picking Sass.

Mustache and Sass are both open source tools. It seems that Mustache with 13.1K GitHub stars and 2.3K forks on GitHub has more adoption than Sass with 12K GitHub stars and 1.93K GitHub forks.

Airbnb, Asana, and Square are some of the popular companies that use Sass, whereas Mustache is used by Twitter, Buffer, and Kickstarter. Sass has a broader approval, being mentioned in 2082 company stacks & 1446 developers stacks; compared to Mustache, which is listed in 231 company stacks and 18 developer stacks.

Advice on Mustache and Sass
awesomebanana2018
Needs advice
on
Stylus
Sass
and
PostCSS

Originally, I was going to start using Sass with Parcel, but then I learned about Stylus, which looked interesting because it can get the property values of something directly instead of through variables, and PostCSS, which looked interesting because you can customize your Pre/Post-processing. Which tool would you recommend?

See more
Replies (1)
Recommends
PostCSS

You're not correct with saying "vs Postcss". You're using Less/Sass/Stylus/... to produce "CSS" (maybe extended means it has some future features) and then in any case PostCSS will play (it is shipped with Parcel/NextJS/CRA/...)

See more
Get Advice from developers at your company using Private StackShare. Sign up for Private StackShare.
Learn More
Pros of Mustache
Pros of Sass
  • 29
    Dead simple templating
  • 12
    Open source
  • 8
    Small
  • 1
    Support in lots of languages
  • 606
    Variables
  • 589
    Mixins
  • 466
    Nested rules
  • 410
    Maintainable
  • 298
    Functions
  • 149
    Modular flexible code
  • 141
    Open source
  • 112
    Selector inheritance
  • 107
    Dynamic
  • 96
    Better than cs
  • 4
    Used by Bootstrap
  • 2
    If and for function
  • 1
    Inheritance (@extend)
  • 1
    Custom functions
  • 1
    Better than less

Sign up to add or upvote prosMake informed product decisions

Cons of Mustache
Cons of Sass
    Be the first to leave a con
    • 1
      Needs to be compiled

    Sign up to add or upvote consMake informed product decisions

    What is Mustache?

    Mustache is a logic-less template syntax. It can be used for HTML, config files, source code - anything. It works by expanding tags in a template using values provided in a hash or object. We call it "logic-less" because there are no if statements, else clauses, or for loops. Instead there are only tags. Some tags are replaced with a value, some nothing, and others a series of values.

    What is Sass?

    Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use Mustache?
    What companies use Sass?
    See which teams inside your own company are using Mustache or Sass.
    Sign up for Private StackShareLearn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Mustache?
    What tools integrate with Sass?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    What are some alternatives to Mustache and Sass?
    Handlebars.js
    Handlebars.js is an extension to the Mustache templating language created by Chris Wanstrath. Handlebars.js and Mustache are both logicless templating languages that keep the view and the code separated like we all know they should be.
    TypeScript
    TypeScript is a language for application-scale JavaScript development. It's a typed superset of JavaScript that compiles to plain JavaScript.
    Pug
    This project was formerly known as "Jade." Pug is a high performance template engine heavily influenced by Haml and implemented with JavaScript for Node.js and browsers.
    Smarty
    Facilitating the separation of presentation (HTML/CSS) from application logic. This implies that PHP code is application logic, and is separated from the presentation
    Jinja
    It is a full featured template engine for Python. It has full unicode support, an optional integrated sandboxed execution environment, widely used and BSD licensed.
    See all alternatives