unstale

npm / less

less

What changed in less 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

4 breaking5 deprecations2 new APIs and options1 performance2 behavior and defaults21 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

less 435 changes

Breaking changes 4

  • The not keyword is no longer silently ignored when used without parentheses in conditions.

    4.6.5release notes

  • Less migrates to native ESM and no longer requires a build step.

    4.6.0release notes

  • Parens-division is now the default math setting, so parentheses are required around division-like expressions to force math evaluation.

    4.0.0release notes

  • Mixin calls now require parentheses, aligning them with syntax for calling detached rulesets.

    4.0.0release notes

Deprecations 5

  • Dynamic @charset interpolation is deprecated for removal in Less 5.x; use a static quoted @charset declaration.

    4.8.0release notes

  • Dash-only mixin names are deprecated for removal in Less 5.x; Less 4 preserves existing output while warning.

    4.8.0release notes

  • Numeric-leading and dash-only variable names are deprecated for removal in Less 5.x; Less 4 preserves existing output while warning.

    4.8.0release notes

  • Bare @variable syntax in non-value at-rule positions is deprecated.

    4.7.0release notes

  • Deprecation warnings are added for features scheduled for removal in Less 5.x.

    4.6.0release notes

New APIs and options 2

  • isdefined() can be used to test whether variables are defined.

    4.0.0release notes

  • The new rgb color syntax is supported, including space-separated channels and slash-separated alpha.

    4.0.0release notes

Performance 1

Behavior and default changes 2

  • The max() function can pass through when it cannot be evaluated in Less.

    4.0.0release notes

  • The min() function can pass through when it cannot be evaluated in Less.

    4.0.0release notes

Fixes and other changes 21

  • Fixes an error when a mixin call is used as a property value.

    4.9.1release notes

  • Interpolation now supports [...] lookups inside @{...}.

    4.9.0release notes

  • Results from escape() are no longer reparsed.

    4.9.0release notes

  • Flattening nested @media queries now keeps the media type first.

    4.9.0release notes

  • Math functions are left for the browser when an argument is a runtime CSS var().

    4.8.1release notes

  • Forwarding an unset variadic no longer overrides defaults in the callee.

    4.8.1release notes

  • Fixes parsing comparisons between inline condition expressions.

    4.8.0release notes

  • Resolves issue #4234 in mixing.

    4.8.0release notes

  • Comparison and range syntax is now parsed in container style() queries.

    4.7.0release notes

  • Fixes color calc inside a from expression.

    4.6.6release notes

  • Preserves spacing for container feature functions.

    4.6.6release notes

  • Avoids a TypeError when dumpLineNumbers is used with nested @supports.

    4.6.6release notes

  • Bundlers are routed to a CJS-typed UMD artifact to fix browser export interop.

    4.6.5release notes

  • Fixes handling of parentheses in media queries.

    4.6.5release notes

  • A CJS bundle is added.

    4.6.3release notes

  • Use the UMD dist/less.js to fix the webpack browser build.

    4.6.3release notes

  • CSS at-rule keywords are excluded from declarationCall parsing.

    4.6.0release notes

  • Fixes a bug affecting imports of module subpaths.

    4.6.0release notes

  • Fixes error propagation from mixin calls.

    4.6.0release notes

  • Less now handles the absence of optional dependencies.

    4.6.0release notes

  • Parent selectors are now resolved in comma-separated pseudo-selector lists.

    4.6.0release notes