LESS
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.
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
Frequently Asked Questions
From the Blog
CI/CD Explained: Ship Code Faster and Safer
CI/CD automates building, testing, and releasing code so teams ship small changes often with less risk. Learn the pipeline stages and best practices.
Read More Career GrowthJunior vs Senior Developer: What Changes
The jump from junior to senior developer is less about coding speed and more about judgement, scope, communication, and owning outcomes rather than tasks.
Read More Career GrowthHow to Stand Out as a Junior Developer
Standing out as a junior developer is less about genius code and more about reliability, curiosity, and communication. Learn the habits that get you noticed and promoted.
Read More ProgrammingQuantization Explained: Shrinking Models Without Losing Power
Quantization reduces the numerical precision of a model's weights so it runs faster and fits in less memory. This guide explains how the quantization parameter works, why it matters for deploying AI, and how to choose the right precision level.
Read More