@less/test-data 4.9.0 → 5.0.0-alpha.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.
Files changed (204) hide show
  1. package/UPSTREAM-FIXTURE-SYNC.md +54 -0
  2. package/package.json +4 -1
  3. package/styles.config.ts +15 -0
  4. package/tests-config/3rd-party/styles.config.cjs +1 -1
  5. package/tests-config/compression/styles.config.cjs +1 -1
  6. package/tests-config/debug/all/styles.config.cjs +1 -1
  7. package/tests-config/debug/comments/styles.config.cjs +1 -1
  8. package/tests-config/debug/mediaquery/styles.config.cjs +1 -1
  9. package/tests-config/filemanagerPlugin/styles.config.cjs +1 -1
  10. package/tests-config/functions-harness/functions-harness.css +8 -0
  11. package/tests-config/functions-harness/functions-harness.less +10 -0
  12. package/tests-config/js-type-errors/js-type-error-2.txt +4 -0
  13. package/tests-config/js-type-errors/js-type-error.txt +1 -1
  14. package/tests-config/namespacing/legacy/namespacing-7.css +15 -0
  15. package/tests-config/namespacing/namespacing-5.less +3 -3
  16. package/tests-config/namespacing/namespacing-7.css +16 -8
  17. package/tests-config/namespacing/styles.config.cjs +4 -1
  18. package/tests-config/sourcemaps/styles.config.cjs +1 -1
  19. package/tests-config/sourcemaps-variable-selector/styles.config.cjs +1 -1
  20. package/tests-config/strict-imports/legacy/strict-imports.css +14 -0
  21. package/tests-config/strict-imports/strict-imports.css +4 -2
  22. package/tests-config/strict-imports/styles.config.cjs +6 -5
  23. package/tests-error/eval/ampersand-merge-template-invalid.less +7 -0
  24. package/tests-error/eval/ampersand-merge-template-invalid.txt +1 -0
  25. package/tests-error/eval/at-rules-undefined-var.less +1 -1
  26. package/tests-error/eval/property-undefined.txt +1 -0
  27. package/tests-error/eval/recursive-property.txt +1 -0
  28. package/tests-unit/at-rule-variable-deprecated/at-rule-variable-deprecated.css +0 -38
  29. package/tests-unit/at-rule-variable-deprecated/at-rule-variable-deprecated.less +0 -70
  30. package/tests-unit/at-rule-variable-interpolation/at-rule-variable-interpolation.css +45 -0
  31. package/tests-unit/at-rule-variable-interpolation/at-rule-variable-interpolation.less +72 -0
  32. package/tests-unit/at-rules/at-rules.css +8 -6
  33. package/tests-unit/at-rules/legacy/at-rules.css +110 -0
  34. package/tests-unit/at-rules/styles.config.ts +5 -0
  35. package/tests-unit/at-rules-bubbling/at-rules-bubbling.css +121 -0
  36. package/tests-unit/at-rules-bubbling/legacy/at-rules-bubbling.css +122 -0
  37. package/tests-unit/at-rules-keyword-comments/at-rules-keyword-comments.css +2 -5
  38. package/tests-unit/at-rules-keyword-comments/legacy/at-rules-keyword-comments.css +12 -0
  39. package/tests-unit/at-rules-targeted/at-rules-targeted.css +5 -3
  40. package/tests-unit/at-rules-targeted/legacy/at-rules-targeted.css +55 -0
  41. package/tests-unit/calc/calc.css +8 -8
  42. package/tests-unit/calc/calc.less +1 -0
  43. package/tests-unit/calc/legacy/calc.css +32 -0
  44. package/tests-unit/color-functions/basic.css +1 -1
  45. package/tests-unit/color-functions/comprehensive.css +5 -5
  46. package/tests-unit/color-functions/comprehensive.less +1 -0
  47. package/tests-unit/color-functions/formats.css +0 -12
  48. package/tests-unit/color-functions/formats.less +0 -15
  49. package/tests-unit/color-functions/legacy/basic.css +21 -0
  50. package/tests-unit/color-functions/legacy/comprehensive.css +48 -0
  51. package/tests-unit/color-functions/legacy/modern-syntax.css +9 -0
  52. package/tests-unit/color-functions/legacy/operations.css +18 -0
  53. package/tests-unit/color-functions/legacy/rgba.css +20 -0
  54. package/tests-unit/color-functions/modern-syntax.css +4 -4
  55. package/tests-unit/color-functions/modern-syntax.less +1 -0
  56. package/tests-unit/color-functions/operations.less +1 -0
  57. package/tests-unit/color-functions/rgba.css +3 -3
  58. package/tests-unit/color-functions/rgba.less +3 -1
  59. package/tests-unit/comments/comments.css +5 -6
  60. package/tests-unit/comments/comments.less +2 -1
  61. package/tests-unit/comments/comments2.css +4 -6
  62. package/tests-unit/comments/comments2.less +3 -0
  63. package/tests-unit/comments/legacy/comments.css +86 -0
  64. package/tests-unit/comments/legacy/comments2.css +21 -0
  65. package/tests-unit/container/container.css +40 -83
  66. package/tests-unit/container/container.less +28 -82
  67. package/tests-unit/container/legacy/container.css +273 -0
  68. package/tests-unit/container/styles.config.ts +8 -0
  69. package/tests-unit/css-3/css-3.css +4 -4
  70. package/tests-unit/css-3/legacy/css-3.css +147 -0
  71. package/tests-unit/css-escapes/css-escapes.css +4 -4
  72. package/tests-unit/css-escapes/legacy/css-escapes.css +34 -0
  73. package/tests-unit/css-escapes/styles.config.ts +5 -0
  74. package/tests-unit/css-grid/css-grid.css +4 -1
  75. package/tests-unit/css-grid/legacy/css-grid.css +27 -0
  76. package/tests-unit/css-guards/css-guards.less +2 -1
  77. package/tests-unit/detached-rulesets/detached-rulesets.css +26 -18
  78. package/tests-unit/detached-rulesets/legacy/detached-rulesets.css +79 -0
  79. package/tests-unit/directives-bubbling/directives-bubbling.css +16 -14
  80. package/tests-unit/extend/extend.css +22 -28
  81. package/tests-unit/extend/legacy/extend.css +79 -0
  82. package/tests-unit/extend/styles.config.ts +5 -0
  83. package/tests-unit/extend-chaining/extend-chaining.css +7 -10
  84. package/tests-unit/extend-chaining/legacy/extend-chaining.css +84 -0
  85. package/tests-unit/extend-clearfix/extend-clearfix.css +1 -3
  86. package/tests-unit/extend-clearfix/extend-clearfix.less +0 -1
  87. package/tests-unit/{extend → extend-clearfix/legacy}/extend-clearfix.css +3 -0
  88. package/tests-unit/extend-exact/extend-exact.css +25 -24
  89. package/tests-unit/extend-exact/legacy/extend-exact.css +40 -0
  90. package/tests-unit/extend-exact/styles.config.ts +5 -0
  91. package/tests-unit/extend-media/extend-media.css +9 -14
  92. package/tests-unit/extend-media/legacy/extend-media.css +27 -0
  93. package/tests-unit/extend-media/styles.config.ts +5 -0
  94. package/tests-unit/extend-nest/extend-nest.css +3 -22
  95. package/tests-unit/extend-nest/legacy/extend-nest.css +60 -0
  96. package/tests-unit/extend-selector/extend-selector.css +42 -67
  97. package/tests-unit/extend-selector/extend-selector.less +0 -15
  98. package/tests-unit/extend-selector/legacy/extend-selector.css +73 -0
  99. package/tests-unit/extend-selector/styles.config.ts +5 -0
  100. package/tests-unit/extract-and-length/extract-and-length.css +6 -5
  101. package/tests-unit/extract-and-length/extract-and-length.less +7 -2
  102. package/tests-unit/extract-and-length/legacy/extract-and-length.css +137 -0
  103. package/tests-unit/functions/functions.css +5 -16
  104. package/tests-unit/functions/functions.less +7 -20
  105. package/tests-unit/functions/legacy/functions.css +244 -0
  106. package/tests-unit/functions/legacy/functions.less +296 -0
  107. package/tests-unit/functions-each/functions-each.css +4 -2
  108. package/tests-unit/import/import-reference-issues.css +6 -6
  109. package/tests-unit/import/import-reference.css +4 -2
  110. package/tests-unit/import/legacy/import-reference-issues.css +27 -0
  111. package/tests-unit/import/legacy/import-reference.css +101 -0
  112. package/tests-unit/import/styles.config.cjs +5 -4
  113. package/tests-unit/layer/layer.css +30 -28
  114. package/tests-unit/layer/legacy/layer.css +136 -0
  115. package/tests-unit/layer/styles.config.ts +5 -0
  116. package/tests-unit/math-css-vars/math-css-vars.css +1 -0
  117. package/tests-unit/math-css-vars/math-css-vars.less +1 -0
  118. package/tests-unit/media/legacy/media.css +274 -0
  119. package/tests-unit/media/media.css +49 -43
  120. package/tests-unit/media/media.less +0 -2
  121. package/tests-unit/media/styles.config.cjs +5 -0
  122. package/tests-unit/merge/merge.css +2 -2
  123. package/tests-unit/mixin-noparens/legacy/mixin-noparens.css +10 -0
  124. package/tests-unit/mixin-noparens/mixin-noparens.css +4 -2
  125. package/tests-unit/mixin-noparens/styles.config.ts +5 -0
  126. package/tests-unit/mixins/legacy/maps.css +9 -0
  127. package/tests-unit/mixins/legacy/mixins.css +147 -0
  128. package/tests-unit/mixins/maps.css +7 -5
  129. package/tests-unit/mixins/mixins.css +7 -5
  130. package/tests-unit/mixins/styles.config.ts +5 -0
  131. package/tests-unit/mixins-closure/legacy/mixins-closure.css +12 -0
  132. package/tests-unit/mixins-closure/mixins-closure.css +4 -2
  133. package/tests-unit/mixins-closure/styles.config.ts +5 -0
  134. package/tests-unit/mixins-guards/legacy/mixins-guards.css +214 -0
  135. package/tests-unit/mixins-guards/mixins-guards.css +5 -3
  136. package/tests-unit/mixins-guards/mixins-guards.less +0 -1
  137. package/tests-unit/mixins-guards/styles.config.ts +5 -0
  138. package/tests-unit/mixins-guards-default-func/legacy/mixins-guards-default-func.css +132 -0
  139. package/tests-unit/mixins-guards-default-func/mixins-guards-default-func.css +0 -2
  140. package/tests-unit/mixins-important/mixins-important.css +33 -19
  141. package/tests-unit/mixins-interpolated/legacy/mixins-interpolated.css +42 -0
  142. package/tests-unit/mixins-interpolated/mixins-interpolated.css +24 -14
  143. package/tests-unit/mixins-interpolated/styles.config.ts +5 -0
  144. package/tests-unit/mixins-nested/legacy/mixins-nested.css +17 -0
  145. package/tests-unit/mixins-nested/mixins-nested.css +16 -12
  146. package/tests-unit/mixins-nested/styles.config.ts +5 -0
  147. package/tests-unit/nesting/legacy/nesting.css +27 -0
  148. package/tests-unit/nesting/nesting-uncollapsed.css +26 -0
  149. package/tests-unit/nesting/nesting.css +1 -1
  150. package/tests-unit/nesting/styles.config.ts +6 -0
  151. package/tests-unit/operations/operations.css +4 -2
  152. package/tests-unit/parse-interpolation/legacy/parse-interpolation.css +39 -0
  153. package/tests-unit/parse-interpolation/parse-interpolation.css +72 -35
  154. package/tests-unit/parse-interpolation/parse-interpolation.less +73 -25
  155. package/tests-unit/parse-interpolation/styles.config.ts +5 -0
  156. package/tests-unit/parser-property-interp/parser-property-interp.css +1 -1
  157. package/tests-unit/parser-property-interp/parser-property-interp.less +2 -2
  158. package/tests-unit/parser-slashed-combinator/parser-slashed-combinator.css +1 -9
  159. package/tests-unit/parser-slashed-combinator/parser-slashed-combinator.less +11 -11
  160. package/tests-unit/plugin/styles.config.ts +11 -0
  161. package/tests-unit/property-accessors/legacy/property-accessors.css +60 -0
  162. package/tests-unit/property-accessors/property-accessors.css +15 -7
  163. package/tests-unit/property-name-interp/legacy/property-name-interp.css +24 -0
  164. package/tests-unit/property-name-interp/property-name-interp.css +1 -1
  165. package/tests-unit/property-name-interp/property-name-interp.less +4 -2
  166. package/tests-unit/property-targeted/legacy/property-targeted.css +7 -0
  167. package/tests-unit/property-targeted/property-targeted.css +1 -1
  168. package/tests-unit/rulesets/legacy/rulesets.css +31 -0
  169. package/tests-unit/rulesets/rulesets.css +30 -30
  170. package/tests-unit/rulesets/styles.config.ts +5 -0
  171. package/tests-unit/scope/legacy/scope.css +41 -0
  172. package/tests-unit/scope/scope.css +1 -1
  173. package/tests-unit/selectors/selectors.css +13 -41
  174. package/tests-unit/styles.config.cjs +1 -1
  175. package/tests-unit/styles.config.ts +8 -0
  176. package/tests-unit/variables/legacy/variable-advanced.css +58 -0
  177. package/tests-unit/variables/variable-advanced.css +1 -4
  178. package/tests-unit/variables/variable-advanced.less +5 -4
  179. package/tests-unit/variables-in-at-rules/variables-in-at-rules.less +3 -2
  180. package/tests-unit/whitespace/legacy/whitespace.css +45 -0
  181. package/tests-unit/whitespace/whitespace.css +3 -2
  182. package/tests-warnings/parentless-ampersand-nested.less +6 -0
  183. package/tests-warnings/parentless-ampersand-nested.txt +42 -0
  184. package/tests-warnings/parentless-ampersand.less +3 -0
  185. package/tests-warnings/parentless-ampersand.txt +21 -0
  186. package/tests-config/rootpath-escape-interpolation/rootpath-escape-interpolation.css +0 -8
  187. package/tests-config/rootpath-escape-interpolation/rootpath-escape-interpolation.less +0 -24
  188. package/tests-config/rootpath-escape-interpolation/styles.config.cjs +0 -8
  189. package/tests-config/sourcemaps/url-interpolation/styles.config.cjs +0 -9
  190. package/tests-config/sourcemaps/url-interpolation/url-interpolation.css +0 -13
  191. package/tests-config/sourcemaps/url-interpolation/url-interpolation.less +0 -24
  192. package/tests-error/parse/property-interpolation-lookup.less +0 -8
  193. package/tests-error/parse/property-interpolation-lookup.txt +0 -4
  194. package/tests-unit/extend/extend-clearfix.less +0 -19
  195. package/tests-unit/lookup-interpolation/lookup-interpolation.css +0 -60
  196. package/tests-unit/lookup-interpolation/lookup-interpolation.less +0 -127
  197. package/tests-unit/media-nested-type/media-nested-type.css +0 -40
  198. package/tests-unit/media-nested-type/media-nested-type.less +0 -51
  199. /package/tests-unit/{directives-bubbling/directives-bubbling.less → at-rules-bubbling/at-rules-bubbling.less} +0 -0
  200. /package/tests-unit/{ie-filters → ie-filters-REMOVED/legacy}/ie-filters.css +0 -0
  201. /package/tests-unit/{ie-filters → ie-filters-REMOVED/legacy}/ie-filters.less +0 -0
  202. /package/tests-unit/{javascript → javascript-REMOVED/legacy}/javascript.css +0 -0
  203. /package/tests-unit/{javascript → javascript-REMOVED/legacy}/javascript.less +0 -0
  204. /package/tests-unit/{javascript → javascript-REMOVED/legacy}/styles.config.cjs +0 -0
@@ -0,0 +1,54 @@
1
+ # Upstream Fixture Sync Notes
2
+
3
+ ## Verification snapshot
4
+
5
+ Rechecked on 2026-07-29 from PR #19 head `4abb411c` after fetching `origin`
6
+ and `upstream`:
7
+
8
+ - `origin/less-5-alpha.1` is also `4abb411c`.
9
+ - `upstream/alpha` is `330e9d71`; `HEAD...upstream/alpha` is `125 0`.
10
+ - `upstream/master` is `89c33e09`; `HEAD...upstream/master` is `108 40`.
11
+
12
+ The fixture/test-data commits in `8ae2cc3b..upstream/master` are the entries
13
+ classified below: #4462, #4461, #4469, #4472, #4473, #4477, and #4479, plus
14
+ release metadata commits #4463, #4471, #4475, and #4482. No additional
15
+ upstream fixture commit is currently unclassified for alpha.1.
16
+
17
+ ## PR #19 scout list
18
+
19
+ - `48a386f6` selector regression: ported in `tests-unit/selectors`.
20
+ - `da514037` media parenthesis regression: ported in `tests-unit/media`.
21
+ - `d250d620` function/condition regressions: ported in `tests-unit/functions`
22
+ and `tests-unit/mixins-guards`.
23
+ - `6161ecf2` inline condition-expression comparison:
24
+ `boolean((2 > 1) = (3 > 2))` is intentionally out of scope for alpha.1;
25
+ Jess currently reports `Direct Less comparison requires value operands`.
26
+ - `ea62d748` container mixin parameter regression: ported in
27
+ `tests-unit/container`; bare container-name variables use interpolation form
28
+ for the Less 5 alpha deprecation contract.
29
+ - `888f6877` container name regressions: simple camelCase, underscore, and
30
+ non-ASCII names are ported. Comma-list container queries, `style(...)`
31
+ feature functions, custom-ident names such as `--body`, and escaped names
32
+ such as `contact\.body` remain out of scope for alpha.1.
33
+ - `d38b43a1` container `style()` comparison/range syntax is intentionally out
34
+ of scope for alpha.1; those inputs are parser errors in the current Jess-backed
35
+ Less wrapper.
36
+ - `83bc8d40` color `calc()` regression: ported in
37
+ `tests-unit/color-functions/modern`.
38
+ - `c58808fd` and `8e1105f0` bare `@var` deprecation/migration: the migration
39
+ fixtures are ported to interpolation-positive coverage. The upstream Less 4
40
+ parser deprecation warning matrix is intentionally not active for alpha.1;
41
+ the Jess-backed wrapper exposes a different structured-warning path.
42
+ - `6b04d2d6` named-args mixin arity regression: ported in
43
+ `tests-unit/mixins-named-args`.
44
+ - `d6b20eee` variadic default forwarding regression is intentionally out of
45
+ scope for alpha.1. The current alpha wrapper renders an unset forwarded rest
46
+ argument as an empty value rather than falling through to the callee default.
47
+ - `1ee86aa3` CSS-var math regression: ported in `tests-unit/math-css-vars` with
48
+ Less 5 alpha expected output. Upstream's Less 4 `percentage(var(--x))` error
49
+ fixture is not active locally because the alpha wrapper currently leaves that
50
+ call for browser runtime CSS.
51
+
52
+ Package metadata, release notes, lockfile churn, and Less 4 parser/runtime
53
+ source changes from upstream/master are intentionally out of scope for this
54
+ alpha fixture sync.
package/package.json CHANGED
@@ -3,12 +3,15 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "4.9.0",
6
+ "version": "5.0.0-alpha.1",
7
7
  "description": "Less files and CSS results",
8
8
  "author": "Alexis Sellier <self@cloudhead.net>",
9
9
  "contributors": [
10
10
  "The Core Less Team"
11
11
  ],
12
+ "bugs": {
13
+ "url": "https://github.com/less/less.js/issues"
14
+ },
12
15
  "license": "Apache-2.0",
13
16
  "repository": {
14
17
  "type": "git",
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Top-level default config for the Less.js fixture corpus.
3
+ *
4
+ * Provides the flat-output default (`collapseNesting: true`) that the Jess
5
+ * all-less harness applies as the base of the config cascade, so it no longer
6
+ * has to hardcode that default. Fixture-directory `styles.config.*` files
7
+ * (nearest ancestor, resolved via cosmiconfig walk-up) override this per
8
+ * directory; anything without an explicit `collapseNesting` inherits this flat
9
+ * default.
10
+ */
11
+ export default {
12
+ output: {
13
+ collapseNesting: true
14
+ }
15
+ };
@@ -2,6 +2,6 @@ module.exports = {
2
2
  language: {
3
3
  less: {
4
4
  "math": 0
5
- }
5
+ }
6
6
  }
7
7
  };
@@ -3,6 +3,6 @@ module.exports = {
3
3
  less: {
4
4
  "math": "strict",
5
5
  "compress": true
6
- }
6
+ }
7
7
  }
8
8
  };
@@ -3,6 +3,6 @@ module.exports = {
3
3
  less: {
4
4
  "math": "strict",
5
5
  "dumpLineNumbers": "all"
6
- }
6
+ }
7
7
  }
8
8
  };
@@ -3,6 +3,6 @@ module.exports = {
3
3
  less: {
4
4
  "math": "strict",
5
5
  "dumpLineNumbers": "comments"
6
- }
6
+ }
7
7
  }
8
8
  };
@@ -3,6 +3,6 @@ module.exports = {
3
3
  less: {
4
4
  "math": "strict",
5
5
  "dumpLineNumbers": "mediaquery"
6
- }
6
+ }
7
7
  }
8
8
  };
@@ -2,6 +2,6 @@ module.exports = {
2
2
  language: {
3
3
  less: {
4
4
  "plugin": "test/plugins/filemanager/index.cjs"
5
- }
5
+ }
6
6
  }
7
7
  };
@@ -0,0 +1,8 @@
1
+ #functions {
2
+ color: #660000;
3
+ width: 16;
4
+ height: undefined("self");
5
+ border-width: 5;
6
+ variable: 11;
7
+ background: linear-gradient(#000, #fff);
8
+ }
@@ -0,0 +1,10 @@
1
+ #functions {
2
+ @var: 10;
3
+ @colors: #000, #fff;
4
+ color: _color("evil red"); // #660000
5
+ width: increment(15);
6
+ height: undefined("self");
7
+ border-width: add(2, 3);
8
+ variable: increment(@var);
9
+ background: linear-gradient(@colors);
10
+ }
@@ -0,0 +1,4 @@
1
+ SyntaxError: JavaScript evaluation error: 'TypeError: Cannot read properties of undefined (reading 'toJS')' in {path}js-type-error.less on line 2, column 8:
2
+ 1 .scope {
3
+ 2 var: `this.foo.toJS`;
4
+ 3 }
@@ -1,4 +1,4 @@
1
- SyntaxError: JavaScript evaluation error: 'TypeError: Cannot read properties of undefined (reading 'toJS')' in {path}js-type-error.less on line 2, column 8:
1
+ SyntaxError: JavaScript evaluation error: 'TypeError: Cannot read property 'toJS' of undefined' in {path}js-type-error.less on line 2, column 8:
2
2
  1 .scope {
3
3
  2 var: `this.foo.toJS`;
4
4
  3 }
@@ -0,0 +1,15 @@
1
+ /* Less 4.x output, recorded when this fixture graduated to v5.
2
+ Historical record only — no test reads this file. */
3
+
4
+ .output {
5
+ a: b;
6
+ }
7
+ .output-2 {
8
+ c: d;
9
+ }
10
+ .dr {
11
+ a: b;
12
+ }
13
+ .dr-2 {
14
+ c: d;
15
+ }
@@ -20,9 +20,9 @@
20
20
  }
21
21
 
22
22
  .another-navbar {
23
- @colors: #theme.dark.navbar.colors() !important;
24
- background: @colors[primary];
25
- border: 1px solid @colors[secondary];
23
+ @theme-colors: #theme.dark.navbar.colors() !important;
24
+ background: @theme-colors[primary];
25
+ border: 1px solid @theme-colors[secondary];
26
26
  }
27
27
 
28
28
  .another {
@@ -1,12 +1,20 @@
1
- .output {
2
- a: b;
1
+ & {
2
+ .output {
3
+ a: b;
4
+ }
3
5
  }
4
- .output-2 {
5
- c: d;
6
+ & {
7
+ .output-2 {
8
+ c: d;
9
+ }
6
10
  }
7
- .dr {
8
- a: b;
11
+ & {
12
+ .dr {
13
+ a: b;
14
+ }
9
15
  }
10
- .dr-2 {
11
- c: d;
16
+ & {
17
+ .dr-2 {
18
+ c: d;
19
+ }
12
20
  }
@@ -1,5 +1,8 @@
1
1
  module.exports = {
2
2
  language: {
3
3
  less: {}
4
- }
4
+ },
5
+ output: [
6
+ { file: '{name}.css', collapseNesting: false }
7
+ ]
5
8
  };
@@ -3,7 +3,7 @@ module.exports = {
3
3
  less: {
4
4
  math: 'strict',
5
5
  strictUnits: true,
6
- sourceMap: {},
6
+ sourceMap: true,
7
7
  globalVars: {
8
8
  '@my-color': 'red'
9
9
  }
@@ -3,7 +3,7 @@ module.exports = {
3
3
  less: {
4
4
  math: 'strict',
5
5
  strictUnits: true,
6
- sourceMap: {}
6
+ sourceMap: true
7
7
  }
8
8
  }
9
9
  };
@@ -0,0 +1,14 @@
1
+ /* Less 4.x output, recorded when this fixture graduated to v5.
2
+ Historical record only — no test reads this file. */
3
+
4
+ .imported {
5
+ background: green;
6
+ }
7
+ @media (max-width: 768px) {
8
+ .mobile {
9
+ color: red;
10
+ }
11
+ }
12
+ .container .nested {
13
+ color: blue;
14
+ }
@@ -6,6 +6,8 @@
6
6
  color: red;
7
7
  }
8
8
  }
9
- .container .nested {
10
- color: blue;
9
+ .container {
10
+ .nested {
11
+ color: blue;
12
+ }
11
13
  }
@@ -1,7 +1,8 @@
1
1
  module.exports = {
2
- language: {
3
- less: {
4
- strictImports: true
5
- }
6
- }
2
+ language: {
3
+ less: {}
4
+ },
5
+ output: [
6
+ { file: '{name}.css', collapseNesting: false }
7
+ ]
7
8
  };
@@ -0,0 +1,7 @@
1
+ @list-quoted: ~'apple, satsuma, banana, pear';
2
+
3
+ @{list-quoted} {
4
+ .fruit-quoted-& {
5
+ content: "Quoted";
6
+ }
7
+ }
@@ -0,0 +1 @@
1
+ Invalid ampersand merge template ".fruit-quoted-&" with parent selector "apple,satsuma,banana,pear"
@@ -1,4 +1,4 @@
1
1
 
2
- @keyframes @name {
2
+ @keyframes @{name} {
3
3
  50% {width: 20px;}
4
4
  }
@@ -2,3 +2,4 @@ NameError: Property '$undefined-prop' is undefined in {path}property-undefined.l
2
2
  1 .test {
3
3
  2 value: $undefined-prop;
4
4
  3 }
5
+
@@ -2,3 +2,4 @@ NameError: Error evaluating function `darken`: Recursive property reference for
2
2
  1 .test {
3
3
  2 color: darken($color, 10%);
4
4
  3 }
5
+
@@ -43,41 +43,3 @@
43
43
  color: red;
44
44
  }
45
45
  }
46
- @media only screen and (max-width: 300px) {
47
- .lookup-media {
48
- width: 240px;
49
- }
50
- }
51
- @keyframes shrinker {
52
- from {
53
- font-size: 15px;
54
- }
55
- to {
56
- font-size: 12px;
57
- }
58
- }
59
- @supports (display: grid) {
60
- .lookup-supports {
61
- display: grid;
62
- }
63
- }
64
- @layer overrides {
65
- .lookup-layered {
66
- color: blue;
67
- }
68
- }
69
- @media (min-width: 900px) {
70
- .lookup-chained {
71
- width: 900px;
72
- }
73
- }
74
- @supports (width: 500px) {
75
- .lookup-value-position {
76
- width: 500px;
77
- }
78
- }
79
- @supports (width: 900px) {
80
- .lookup-value-position-chained {
81
- width: 900px;
82
- }
83
- }
@@ -74,73 +74,3 @@
74
74
  color: red;
75
75
  }
76
76
  }
77
-
78
- // --- bare `[...]` lookups in the same structural positions ---
79
- // A lookup parses into a NamespaceValue rather than a Variable. These were
80
- // silently exempt from the deprecation until the node-type test was widened,
81
- // so every position is covered explicitly here.
82
- @lookup: {
83
- query: ~"only screen and (max-width: 300px)";
84
- anim: shrinker;
85
- supported: ~"(display: grid)";
86
- layer-name: overrides;
87
- @deep: {
88
- query: ~"(min-width: 900px)";
89
- }
90
- };
91
-
92
- @media @lookup[query] {
93
- .lookup-media {
94
- width: 240px;
95
- }
96
- }
97
-
98
- @keyframes @lookup[anim] {
99
- from { font-size: 15px; }
100
- to { font-size: 12px; }
101
- }
102
-
103
- @supports @lookup[supported] {
104
- .lookup-supports {
105
- display: grid;
106
- }
107
- }
108
-
109
- @layer @lookup[layer-name] {
110
- .lookup-layered {
111
- color: blue;
112
- }
113
- }
114
-
115
- // chained lookup — still one deprecation, not one per segment
116
- @media @lookup[@deep][query] {
117
- .lookup-chained {
118
- width: 900px;
119
- }
120
- }
121
-
122
- // A lookup in a declaration value inside `(...)` stays a value position and is
123
- // not deprecated, mirroring the `@disp` case above.
124
- //
125
- // `@supports` scans its prelude as text, so a bare lookup reaches the permissive
126
- // regex rather than being parsed structurally. Matching only `@values` used to
127
- // resolve it to the whole ruleset and leave `[size]` behind, rendering
128
- // `(width: [size])`. Both the flat and chained forms are covered here.
129
- @values: {
130
- size: 500px;
131
- @deep: {
132
- size: 900px;
133
- }
134
- };
135
-
136
- @supports (width: @values[size]) {
137
- .lookup-value-position {
138
- width: 500px;
139
- }
140
- }
141
-
142
- @supports (width: @values[@deep][size]) {
143
- .lookup-value-position-chained {
144
- width: 900px;
145
- }
146
- }
@@ -0,0 +1,45 @@
1
+ @media only screen and (max-width: 200px) {
2
+ .body {
3
+ width: 480px;
4
+ }
5
+ }
6
+ @media all and (tv) {
7
+ .all-and-tv {
8
+ var: yes;
9
+ }
10
+ }
11
+ @media screen, print {
12
+ .list {
13
+ margin: 0;
14
+ }
15
+ }
16
+ @container foo (min-width: 400px) {
17
+ .sticky-child {
18
+ font-size: 75%;
19
+ }
20
+ }
21
+ @supports (display: flex) {
22
+ .flex {
23
+ display: flex;
24
+ }
25
+ }
26
+ @supports (display: grid) and (gap: 1rem) {
27
+ .grid {
28
+ display: grid;
29
+ }
30
+ }
31
+ @keyframes enlarger {
32
+ from {
33
+ font-size: 12px;
34
+ }
35
+ to {
36
+ font-size: 15px;
37
+ }
38
+ }
39
+ @namespace less "http://lesscss.org";
40
+ @namespace svgns "http://www.w3.org/2000/svg";
41
+ @layer base {
42
+ .layered {
43
+ color: red;
44
+ }
45
+ }
@@ -0,0 +1,72 @@
1
+ // Less 5 coverage for variable interpolation in non-value at-rule positions
2
+ // (at-rule preludes, names, and identifiers). Less 4.8 added a companion
3
+ // deprecated-bare-@variable fixture; Less 5 keeps the migration target as the
4
+ // positive parse/eval fixture.
5
+
6
+ // --- nestable at-rule preludes ---
7
+ @smartphone: ~"only screen and (max-width: 200px)";
8
+ @media @{smartphone} {
9
+ .body {
10
+ width: 480px;
11
+ }
12
+ }
13
+
14
+ @all: ~"all";
15
+ @tv: ~"(tv)";
16
+ @media @{all} and @{tv} {
17
+ .all-and-tv {
18
+ var: yes;
19
+ }
20
+ }
21
+
22
+ @breakpoint: screen;
23
+ @media @{breakpoint}, print {
24
+ .list {
25
+ margin: 0;
26
+ }
27
+ }
28
+
29
+ @varfoo: foo;
30
+ @threshold: 400px;
31
+ @container @{varfoo} (min-width: @threshold) {
32
+ .sticky-child {
33
+ font-size: 75%;
34
+ }
35
+ }
36
+
37
+ // --- unknown at-rule prelude ---
38
+ @supported: ~"(display: flex)";
39
+ @supports @{supported} {
40
+ .flex {
41
+ display: flex;
42
+ }
43
+ }
44
+
45
+ // A bare @variable in a *nested declaration value* (inside `(...)`) is a
46
+ // declaration value, not a structural at-rule identifier/prelude position.
47
+ @disp: grid;
48
+ @supports (display: @disp) and (gap: 1rem) {
49
+ .grid {
50
+ display: grid;
51
+ }
52
+ }
53
+
54
+ // --- at-rule identifiers / names ---
55
+ @anim: enlarger;
56
+ @keyframes @{anim} {
57
+ from { font-size: 12px; }
58
+ to { font-size: 15px; }
59
+ }
60
+
61
+ @ns: less;
62
+ @namespace @{ns} "http://lesscss.org";
63
+
64
+ @svg-ns: svgns;
65
+ @namespace @{svg-ns} "http://www.w3.org/2000/svg";
66
+
67
+ @layer-name: base;
68
+ @layer @{layer-name} {
69
+ .layered {
70
+ color: red;
71
+ }
72
+ }
@@ -15,7 +15,7 @@
15
15
  @namespace svg url(http://www.w3.org/2000/svg);
16
16
  @viewport {
17
17
  width: device-width;
18
- initial-scale: 1;
18
+ initial-scale: 1.0;
19
19
  }
20
20
  @keyframes slidein {
21
21
  from {
@@ -82,8 +82,8 @@
82
82
  display: none;
83
83
  }
84
84
  }
85
- @media (max-width: 768px) {
86
- .container {
85
+ .container {
86
+ @media (max-width: 768px) {
87
87
  padding: 10px;
88
88
  }
89
89
  }
@@ -95,9 +95,11 @@
95
95
  margin-left: 3cm;
96
96
  margin-right: 4cm;
97
97
  }
98
- @media (max-width: 600px) {
99
- .wrapper .mobile-only {
100
- display: block;
98
+ .wrapper {
99
+ @media (max-width: 600px) {
100
+ .mobile-only {
101
+ display: block;
102
+ }
101
103
  }
102
104
  }
103
105
  @media (min-width: 1024px) {