less 4.6.4 → 4.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/less-node.cjs +26 -4
- package/dist/less.cjs +14685 -0
- package/dist/less.js +29 -6
- package/dist/less.min.js +2 -2
- package/dist/less.min.js.map +1 -1
- package/lib/less/parser/parser.js +24 -2
- package/package.json +4 -3
package/dist/less-node.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Less - Leaner CSS v4.6.
|
|
2
|
+
* Less - Leaner CSS v4.6.5
|
|
3
3
|
* http://lesscss.org
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2009-2026, Alexis Sellier <self@cloudhead.net>
|
|
@@ -6400,6 +6400,7 @@ const Parser = function Parser(context, imports, fileInfo, currentIndex) {
|
|
|
6400
6400
|
spacing = true;
|
|
6401
6401
|
}
|
|
6402
6402
|
} else if (parserInput.$char('(')) {
|
|
6403
|
+
let closed = false;
|
|
6403
6404
|
p = this.property();
|
|
6404
6405
|
parserInput.save();
|
|
6405
6406
|
if (!p && syntaxOptions.queryInParens && parserInput.$re(/^[0-9a-z-]*\s*([<>]=|<=|>=|[<>]|=)/)) {
|
|
@@ -6413,9 +6414,20 @@ const Parser = function Parser(context, imports, fileInfo, currentIndex) {
|
|
|
6413
6414
|
}
|
|
6414
6415
|
} else {
|
|
6415
6416
|
parserInput.restore();
|
|
6417
|
+
parserInput.save();
|
|
6416
6418
|
e = this.value();
|
|
6419
|
+
if (e && parserInput.$char(')')) {
|
|
6420
|
+
closed = true;
|
|
6421
|
+
parserInput.forget();
|
|
6422
|
+
} else {
|
|
6423
|
+
parserInput.restore();
|
|
6424
|
+
e = this.mediaFeature(syntaxOptions);
|
|
6425
|
+
}
|
|
6417
6426
|
}
|
|
6418
|
-
if (parserInput.$char(')')) {
|
|
6427
|
+
if (!closed && parserInput.$char(')')) {
|
|
6428
|
+
closed = true;
|
|
6429
|
+
}
|
|
6430
|
+
if (closed) {
|
|
6419
6431
|
if (p && !e) {
|
|
6420
6432
|
nodes.push(new (tree.Paren)(new (tree.QueryInParens)(p.op, p.lvalue, p.rvalue, rangeP ? rangeP.op : null, rangeP ? rangeP.rvalue : null, p._index)));
|
|
6421
6433
|
e = p;
|
|
@@ -6935,8 +6947,18 @@ const Parser = function Parser(context, imports, fileInfo, currentIndex) {
|
|
|
6935
6947
|
const result = this.parenthesisCondition(needsParens);
|
|
6936
6948
|
if (result) {
|
|
6937
6949
|
result.negate = !result.negate;
|
|
6950
|
+
return result;
|
|
6951
|
+
}
|
|
6952
|
+
|
|
6953
|
+
// Allow simple bare values (keyword/variable) without parens,
|
|
6954
|
+
// e.g., `not false` or `not @var`.
|
|
6955
|
+
// Complex conditions (comparisons, function calls) require parentheses.
|
|
6956
|
+
const entities = this.entities;
|
|
6957
|
+
const index = parserInput.i;
|
|
6958
|
+
const a = entities.keyword() || entities.variable() || entities.quoted() || entities.mixinLookup();
|
|
6959
|
+
if (a) {
|
|
6960
|
+
return new(tree.Condition)('=', a, new(tree.Keyword)('true'), index + currentIndex, true);
|
|
6938
6961
|
}
|
|
6939
|
-
return result;
|
|
6940
6962
|
}
|
|
6941
6963
|
},
|
|
6942
6964
|
parenthesisCondition: function (needsParens) {
|
|
@@ -14045,7 +14067,7 @@ var imageSize = environment => {
|
|
|
14045
14067
|
};
|
|
14046
14068
|
|
|
14047
14069
|
createRequire();
|
|
14048
|
-
const version = "4.6.
|
|
14070
|
+
const version = "4.6.5";
|
|
14049
14071
|
|
|
14050
14072
|
const less = createFromEnvironment(environment, [new FileManager(), new UrlFileManager()], version);
|
|
14051
14073
|
|