less 4.0.0 → 4.1.1

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.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
- * Less - Leaner CSS v4.0.0
2
+ * Less - Leaner CSS v4.1.1
3
3
  * http://lesscss.org
4
4
  *
5
- * Copyright (c) 2009-2020, Alexis Sellier <self@cloudhead.net>
5
+ * Copyright (c) 2009-2021, Alexis Sellier <self@cloudhead.net>
6
6
  * Licensed under the Apache-2.0 License.
7
7
  *
8
8
  * @license Apache-2.0
@@ -11,7 +11,7 @@
11
11
  (function (global, factory) {
12
12
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
13
13
  typeof define === 'function' && define.amd ? define(factory) :
14
- (global = global || self, global.less = factory());
14
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.less = factory());
15
15
  }(this, (function () { 'use strict';
16
16
 
17
17
  // Export a new default each time
@@ -983,23 +983,24 @@
983
983
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
984
984
  this file except in compliance with the License. You may obtain a copy of the
985
985
  License at http://www.apache.org/licenses/LICENSE-2.0
986
-
986
+
987
987
  THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
988
988
  KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
989
989
  WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
990
990
  MERCHANTABLITY OR NON-INFRINGEMENT.
991
-
991
+
992
992
  See the Apache Version 2.0 License for specific language governing permissions
993
993
  and limitations under the License.
994
994
  ***************************************************************************** */
995
+
995
996
  function __spreadArrays() {
996
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
997
- s += arguments[i].length;
997
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
998
998
  for (var r = Array(s), k = 0, i = 0; i < il; i++)
999
999
  for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
1000
1000
  r[k] = a[j];
1001
1001
  return r;
1002
- }
1002
+ }
1003
+
1003
1004
  function assignProp(carry, key, newVal, originalObject, includeNonenumerable) {
1004
1005
  var propType = {}.propertyIsEnumerable.call(originalObject, key)
1005
1006
  ? 'enumerable'
@@ -1026,9 +1027,7 @@
1026
1027
  * @export
1027
1028
  */
1028
1029
  function copy(target, options) {
1029
- if (options === void 0) {
1030
- options = {};
1031
- }
1030
+ if (options === void 0) { options = {}; }
1032
1031
  if (isArray(target))
1033
1032
  return target.map(function (i) { return copy(i, options); });
1034
1033
  if (!isPlainObject(target))
@@ -2891,7 +2890,8 @@
2891
2890
  // so `1px + 2` will yield `3px`.
2892
2891
  operate: function (context, op, other) {
2893
2892
  /* jshint noempty:false */
2894
- var value = this._operate(context, op, this.value, other.value), unit = this.unit.clone();
2893
+ var value = this._operate(context, op, this.value, other.value);
2894
+ var unit = this.unit.clone();
2895
2895
  if (op === '+' || op === '-') {
2896
2896
  if (unit.numerator.length === 0 && unit.denominator.length === 0) {
2897
2897
  unit = other.unit.clone();
@@ -3006,8 +3006,9 @@
3006
3006
  if (b instanceof Dimension && a instanceof Color) {
3007
3007
  b = b.toColor();
3008
3008
  }
3009
- if (!a.operate) {
3010
- if (a instanceof Operation && a.op === '/' && context.math === MATH$1.PARENS_DIVISION) {
3009
+ if (!a.operate || !b.operate) {
3010
+ if ((a instanceof Operation || b instanceof Operation)
3011
+ && a.op === '/' && context.math === MATH$1.PARENS_DIVISION) {
3011
3012
  return new Operation(this.op, [a, b], this.isSpaced);
3012
3013
  }
3013
3014
  throw { type: 'Operation',
@@ -3034,10 +3035,10 @@
3034
3035
 
3035
3036
  /*! *****************************************************************************
3036
3037
  Copyright (c) Microsoft Corporation.
3037
-
3038
+
3038
3039
  Permission to use, copy, modify, and/or distribute this software for any
3039
3040
  purpose with or without fee is hereby granted.
3040
-
3041
+
3041
3042
  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
3042
3043
  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
3043
3044
  AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
@@ -3046,9 +3047,9 @@
3046
3047
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
3047
3048
  PERFORMANCE OF THIS SOFTWARE.
3048
3049
  ***************************************************************************** */
3050
+
3049
3051
  function __spreadArrays$1() {
3050
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
3051
- s += arguments[i].length;
3052
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
3052
3053
  for (var r = Array(s), k = 0, i = 0; i < il; i++)
3053
3054
  for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
3054
3055
  r[k] = a[j];
@@ -7267,9 +7268,9 @@
7267
7268
  parserInput.restore();
7268
7269
  return;
7269
7270
  }
7270
- if (!lookups && !hasParens) {
7271
- // This isn't a valid mixin call
7272
- parserInput.restore('Unrecognized input. Possibly missing \'(\' in mixin call.');
7271
+ if (inValue && !lookups && !hasParens) {
7272
+ // This isn't a valid in-value mixin call
7273
+ parserInput.restore();
7273
7274
  return;
7274
7275
  }
7275
7276
  if (!inValue && parsers.important()) {
@@ -10511,22 +10512,25 @@
10511
10512
  return render;
10512
10513
  }
10513
10514
 
10514
- var version = "4.0.0";
10515
+ var version = "4.1.1";
10516
+
10517
+ function parseNodeVersion(version) {
10518
+ var match = version.match(/^v(\d{1,2})\.(\d{1,2})\.(\d{1,2})(?:-([0-9A-Za-z-.]+))?(?:\+([0-9A-Za-z-.]+))?$/); // eslint-disable-line max-len
10519
+ if (!match) {
10520
+ throw new Error('Unable to parse: ' + version);
10521
+ }
10522
+
10523
+ var res = {
10524
+ major: parseInt(match[1], 10),
10525
+ minor: parseInt(match[2], 10),
10526
+ patch: parseInt(match[3], 10),
10527
+ pre: match[4] || '',
10528
+ build: match[5] || '',
10529
+ };
10530
+
10531
+ return res;
10532
+ }
10515
10533
 
10516
- function parseNodeVersion(version) {
10517
- var match = version.match(/^v(\d{1,2})\.(\d{1,2})\.(\d{1,2})(?:-([0-9A-Za-z-.]+))?(?:\+([0-9A-Za-z-.]+))?$/); // eslint-disable-line max-len
10518
- if (!match) {
10519
- throw new Error('Unable to parse: ' + version);
10520
- }
10521
- var res = {
10522
- major: parseInt(match[1], 10),
10523
- minor: parseInt(match[2], 10),
10524
- patch: parseInt(match[3], 10),
10525
- pre: match[4] || '',
10526
- build: match[5] || '',
10527
- };
10528
- return res;
10529
- }
10530
10534
  var parseNodeVersion_1 = parseNodeVersion;
10531
10535
 
10532
10536
  function lessRoot (environment, fileManagers) {