100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Web

LESS

BeginnerTool11.5K learners

LESS (Leaner Style Sheets) is a CSS preprocessor that extends CSS with variables, nesting, mixins, and operations, compiling into standard CSS and offering a syntax that stays close to plain CSS.

#LESS#Web#Tool#Beginner#SASS#CSS3#PostCSS#HTML5#WebDevelopment#Glossary#SkillVeris

Definition

LESS (Leaner Style Sheets) is a CSS preprocessor that extends CSS with variables, nesting, mixins, and operations, compiling into standard CSS and offering a syntax that stays close to plain CSS.

Overview

LESS was released in 2009 as one of the earliest CSS preprocessors, aiming to add just enough dynamic capability to CSS — variables, nesting, mixins, and simple math operations — without straying far from CSS's existing syntax and mental model. Because valid CSS is (almost entirely) valid LESS, developers could adopt it with minimal relearning, which helped it gain early traction alongside its main rival, SASS. LESS can be compiled either at build time using Node.js-based tooling, or historically even in the browser via a JavaScript library, though build-time compilation through bundlers like Webpack or Vite is now standard practice for performance reasons. Its feature set overlaps heavily with SASS — nested rules, reusable mixins, variables, and basic operators — but LESS has generally stayed a bit simpler and closer to native CSS syntax, while SASS (particularly its SCSS syntax) added more advanced programming constructs like control-flow directives and more powerful functions over time. LESS was historically notable for being the preprocessor behind early versions of the Bootstrap framework, which helped drive its adoption, though Bootstrap later switched to SASS. Today, LESS is used mostly in codebases that adopted it years ago or in ecosystems like Ant Design that still build on it, while new projects more often reach for SASS, PostCSS, or lean on native CSS3 features directly. It is often mentioned alongside CSS3 in this space.

Key Features

  • Variables, nesting, and mixins similar to SASS
  • Syntax that stays close to standard CSS
  • Compiles to plain CSS via Node.js-based tooling
  • Basic arithmetic operations on values like widths and colors
  • Historically used as the preprocessor behind early Bootstrap versions
  • Simpler feature set than SASS's more advanced control-flow directives

Use Cases

Maintaining legacy stylesheets built on LESS
Styling projects built on frameworks like Ant Design
Reducing CSS repetition with variables and mixins
Organizing styles with nested selectors
Generating theme variants using variables and functions
Incremental adoption in codebases with plain CSS

Frequently Asked Questions