🍋
Menu
.less Code

Less (Leaner Style Sheets)

Less is a CSS preprocessor that adds variables, mixins, nesting, and functions to standard CSS. Less files compile to regular CSS and were particularly popular with the Bootstrap framework before Sass became more dominant.

MIME Type

text/x-less

Type

Text

Compression

Lossless

Advantages

  • + Variables and mixins reduce CSS repetition
  • + Can compile in the browser without a build step
  • + Simpler syntax than early Sass (no indentation rules)

Disadvantages

  • Declining ecosystem — Sass is more widely used
  • Native CSS custom properties replace many Less features
  • Fewer functions and features than modern Sass

When to Use .LESS

Use Less for projects already using it; for new projects, prefer Sass or native CSS custom properties.

Technical Details

Less extends CSS with @variables, .mixin() definitions, nesting, and built-in functions for color manipulation and math. It can compile in the browser (less.js) or server-side via Node.js.

History

Alexis Sellier created Less in 2009 as a simpler alternative to Sass. Bootstrap 3 (2013) used Less as its default preprocessor, driving wide adoption. Bootstrap 4 switched to Sass, and Less usage has declined.

Convert from .LESS

Convert to .LESS

Related Formats

Related Terms