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

Less

2.5K
1.2K
+ 1
930
Sass

42.5K
31.5K
+ 1
3K
Add tool

Less vs Sass: What are the differences?

Introduction: This Markdown code presents the key differences between Less and Sass, two popular CSS preprocessor languages.

  1. Syntax: Less uses a CSS-like syntax with some additional features, while Sass has a more concise and flexible syntax with powerful features like mixins and variables.
  2. Compilation: Less is compiled using JavaScript in the browser or server-side, whereas Sass has a Ruby-based command-line tool that compiles the code.
  3. Inheritance: Less does not support native inheritance, while Sass allows for robust inheritance capabilities through the use of @extend.
  4. Functions: Sass offers a robust set of functions for manipulating colors, strings, lists, and other data types, while Less has a limited set of built-in functions.
  5. Community Support: Sass has a larger and more active community contributing to its development, documentation, and tooling, making it more widely adopted in the industry compared to Less.
  6. Variables: In Less, variables are defined using the @ symbol, while in Sass, variables are defined using the $ symbol.

In Summary, the key differences between Less and Sass lie in their syntax, compilation methods, inheritance capabilities, functions, community support, and variable declaration syntax.

Advice on Less and Sass
awesomebanana2018
Needs advice
on
PostCSSPostCSSSassSass
and
StylusStylus

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 (2)
Recommends
on
PostCSSPostCSS

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
Decisions about Less and Sass
Saulius Kolesinskas
Engineering Manager at Vinted · | 5 upvotes · 18.5K views

We extensively use Sass and CSS Modules as our styling solution at Vinted. Even though we considered adopting a CSS-in-JS library, we ultimately leaned towards the flexibility that Sass and CSS Modules offer.

Vinted also has an internal design system where Storybook is used for development and documentation.

See more
Noel Broda
Founder, CEO, CTO at NoFilter · | 2 upvotes · 15.2K views

We know that Sass is not a replace for CSS, but in my mind there is no CSS with no Sass.

One of the first complement/plugins I add to the environment, are the Sass processing files/demons.

I couldn't imagine going back to pure CSS. Sass is even the way to go, regarding Styled Components, CSS Modules, and all the other options.

See more
Cory Bell

JSS is makes a lot of sense when styling React components and styled-components is a really nice implementation of JSS. I still get to write pure CSS, but in a more componentized way. With CSS post-processors like SASS and LESS, you spend a lot of time deciding where your .scss or .less files belong, which classes should be shared, and generally fighting the component nature of React. With styled-components, you get the best of CSS and React. In this project, I have ZERO CSS files or global CSS classes and I leverage mixins quite a bit.

See more
Manage your open source components, licenses, and vulnerabilities
Learn More
Pros of Less
Pros of Sass
  • 215
    Better than css
  • 177
    Variables
  • 141
    Mixins
  • 99
    Maintainable
  • 79
    Used by bootstrap
  • 55
    Open source
  • 50
    Extendable
  • 43
    Functions
  • 39
    Dynamic
  • 30
    Fast
  • 2
    CSS is valid LESS, very easy to pick up
  • 613
    Variables
  • 594
    Mixins
  • 466
    Nested rules
  • 410
    Maintainable
  • 300
    Functions
  • 149
    Modular flexible code
  • 143
    Open source
  • 112
    Selector inheritance
  • 107
    Dynamic
  • 96
    Better than cs
  • 5
    Used by Bootstrap
  • 3
    If and for function
  • 2
    Better than less
  • 1
    Inheritance (@extend)
  • 1
    Custom functions

Sign up to add or upvote prosMake informed product decisions

Cons of Less
Cons of Sass
    Be the first to leave a con
    • 6
      Needs to be compiled

    Sign up to add or upvote consMake informed product decisions

    What is Less?

    Less is a CSS pre-processor, meaning that it extends the CSS language, adding features that allow variables, mixins, functions and many other techniques that allow you to make CSS that is more maintainable, themable and extendable.

    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 Less?
    What companies use Sass?
    Manage your open source components, licenses, and vulnerabilities
    Learn More

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

    What tools integrate with Less?
    What tools integrate with Sass?

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

    What are some alternatives to Less and Sass?
    CSS 3
    CSS3 is the latest evolution of the Cascading Style Sheets language and aims at extending CSS2.1. It brings a lot of long-awaited novelties, like rounded corners, shadows, gradients, transitions or animations, as well as new layouts like multi-columns, flexible box or grid layouts. Experimental parts are vendor-prefixed and should either be avoided in production environments, or used with extreme caution as both their syntax and semantics can change in the future.
    JavaScript
    JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.
    Git
    Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
    GitHub
    GitHub is the best place to share code with friends, co-workers, classmates, and complete strangers. Over three million people use GitHub to build amazing things together.
    Python
    Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
    See all alternatives