npm / less
less
What changed in less 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.
1 breaking4 deprecations16 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initless 421 changes
Breaking changes 1
The not keyword is no longer silently ignored when used without parentheses in conditions.
Deprecations 4
Dynamic @charset interpolation is deprecated for removal in Less 5.x; use a static quoted @charset declaration.
Dash-only mixin names are deprecated for removal in Less 5.x; Less 4 preserves existing output while warning.
Numeric-leading and dash-only variable names are deprecated for removal in Less 5.x; Less 4 preserves existing output while warning.
Bare @variable syntax in non-value at-rule positions is deprecated.
Fixes and other changes 16
Fixes an error when a mixin call is used as a property value.
Interpolation now supports
[...]lookups inside@{...}.Results from
escape()are no longer reparsed.Flattening nested
@mediaqueries now keeps the media type first.Math functions are left for the browser when an argument is a runtime CSS var().
Forwarding an unset variadic no longer overrides defaults in the callee.
Fixes parsing comparisons between inline condition expressions.
Resolves issue #4234 in mixing.
Comparison and range syntax is now parsed in container style() queries.
Fixes color calc inside a from expression.
Preserves spacing for container feature functions.
Avoids a TypeError when dumpLineNumbers is used with nested @supports.
Bundlers are routed to a CJS-typed UMD artifact to fix browser export interop.
Fixes handling of parentheses in media queries.
A CJS bundle is added.
Use the UMD dist/less.js to fix the webpack browser build.