Releases: less/less.js
v4.2.2
#4290 Fix #4268 nested pseudo-selector parsing (@puckowski)
#4291 Enhance Less.js test environment setup (#4291) (@iChenLei)
#4295 Fix #4252 container queries created via mixin evaluating variables incorrectly (@puckowski)
#4294 Fix #3737 allow blank variable declarationd (@puckowski)
#4292 Fix #4258 variable interpolation after math (@puckowski)
#4293 Fix #4264 strip line comment from expression (@puckowski)
#4302 Fix #4301 at-rule declarations missing (@puckowski)
#4309 Fix Node 23 CI (#4309) (@iChenLei)
v4.2.1
v4.2.0
- #3811 add support for container queries (@puckowski)
- #3761 fix faulty source map generation with variables in selectors, fixes #3567 (@pgoldberg)
- #3700 parsing variables fail when there is no trailing semicolon (@b-kelly)
- #3719 modify
this
pointer so that it is not empty. (@lumburr) - #3649 fixes #2991 empty
@media
queries generated when compiling less file with (reference) to bootstrap (@MoonCoral)
v4.1.3
- #3673 Feat: add support for case-insensitive attribute selectors (#3673) (@iChenLei)
- #3710 Feat: add
disablePluginRule
flag for render() options (#3710) (@broofa @edhgoose) - #3656 Fix #3655 for param tag is null (#3658) (@langren1353)
- #3658 Fix #3646 forcefully change unsupported input to strings (#3658) (@gzb1128)
- #3668 Fix change keyword plugin and import regexp (#3668) (@iChenLei)
- #3613 Fix #3591: refactor debugInfo from class to function (#3613) (@drdevlin)
- #3716 Fix https failures on macOS (#3716) (@joeyparrish)
v4.1.2
v4.1.1
v4.1.0
Mixin parentheses requirement removed
This was maybe too big a change without some kind of deprecation or conversion.
So for this version, this works again:
.mixin;
v4.0.0
This release has 2 breaking changes:
Parentheses required for mixin calls
This aligns it with syntax for calling detached rulesets.
Example
.mixin() {}
.mixin; // error in 4.0
Parens-division now the default math setting
Parentheses are required (by default) around division-like expressions, to force math evaluation.
Example:
@ratio_large: 16;
@ratio_small: 9;
/** The following will produce `device-aspect-ratio: 1.77777778` by default in 3.x */
@media all and (device-aspect-ratio: @ratio_large / @ratio_small) {
.body { max-width: 800px; }
}
Produces:
@media all and (device-aspect-ratio: 16 / 9) {
.body {
max-width: 800px;
}
}
You can, of course, get old math behavior. See: http://lesscss.org/usage/#less-options-math
What's New
- min() / max() functions can pass-through if it cannot be evaluated in Less
- isdefined() can be used to test if variables are defined (e.g.
isdefined(@unknown)
) - New rgb color syntax supported (e.g.
rgb(0 128 255 / 50%)
)