@less/test-data 4.9.1 → 5.0.0-alpha.10

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 (227) 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/bootstrap4.css +182 -365
  5. package/tests-config/3rd-party/styles.config.cjs +1 -1
  6. package/tests-config/at-rules-compressed/at-rules-compressed.css +1 -1
  7. package/tests-config/at-rules-compressed-evaluation/at-rules-compressed-evaluation.css +1 -1
  8. package/tests-config/compression/compression.css +2 -2
  9. package/tests-config/compression/compression.less +0 -4
  10. package/tests-config/compression/styles.config.cjs +1 -1
  11. package/tests-config/debug/all/styles.config.cjs +1 -1
  12. package/tests-config/debug/comments/styles.config.cjs +1 -1
  13. package/tests-config/debug/mediaquery/styles.config.cjs +1 -1
  14. package/tests-config/filemanagerPlugin/styles.config.cjs +1 -1
  15. package/tests-config/functions-harness/functions-harness.css +8 -0
  16. package/tests-config/functions-harness/functions-harness.less +10 -0
  17. package/tests-config/js-type-errors/js-type-error-2.txt +4 -0
  18. package/tests-config/js-type-errors/js-type-error.txt +1 -1
  19. package/tests-config/namespacing/legacy/namespacing-7.css +15 -0
  20. package/tests-config/namespacing/namespacing-5.less +3 -3
  21. package/tests-config/namespacing/namespacing-7.css +16 -8
  22. package/tests-config/namespacing/styles.config.cjs +4 -1
  23. package/tests-config/sourcemaps/styles.config.cjs +1 -1
  24. package/tests-config/sourcemaps-variable-selector/styles.config.cjs +1 -1
  25. package/tests-config/static-urls/urls.css +2 -1
  26. package/tests-config/strict-imports/legacy/strict-imports.css +14 -0
  27. package/tests-config/strict-imports/strict-imports.css +4 -2
  28. package/tests-config/strict-imports/styles.config.cjs +6 -5
  29. package/tests-config/units/loose/loose.css +21 -0
  30. package/tests-config/units/loose/loose.less +21 -0
  31. package/tests-config/units/loose/styles.config.cjs +8 -0
  32. package/tests-config/units/no-strict/legacy/no-strict.css +24 -0
  33. package/tests-config/units/no-strict/no-strict.css +12 -12
  34. package/tests-config/url-args/legacy/urls.css +58 -0
  35. package/tests-config/url-args/urls.css +2 -1
  36. package/tests-error/eval/ampersand-merge-template-invalid.less +7 -0
  37. package/tests-error/eval/ampersand-merge-template-invalid.txt +1 -0
  38. package/tests-error/eval/at-rules-undefined-var.less +1 -1
  39. package/tests-error/eval/property-undefined.txt +1 -0
  40. package/tests-error/eval/recursive-property.txt +1 -0
  41. package/tests-unit/at-rule-variable-deprecated/at-rule-variable-deprecated.css +0 -38
  42. package/tests-unit/at-rule-variable-deprecated/at-rule-variable-deprecated.less +0 -70
  43. package/tests-unit/at-rule-variable-interpolation/at-rule-variable-interpolation.css +45 -0
  44. package/tests-unit/at-rule-variable-interpolation/at-rule-variable-interpolation.less +72 -0
  45. package/tests-unit/at-rules/at-rules.css +8 -6
  46. package/tests-unit/at-rules/legacy/at-rules.css +110 -0
  47. package/tests-unit/at-rules/styles.config.ts +5 -0
  48. package/tests-unit/at-rules-bubbling/at-rules-bubbling.css +121 -0
  49. package/tests-unit/at-rules-bubbling/legacy/at-rules-bubbling.css +122 -0
  50. package/tests-unit/at-rules-keyword-comments/at-rules-keyword-comments.css +2 -5
  51. package/tests-unit/at-rules-keyword-comments/legacy/at-rules-keyword-comments.css +12 -0
  52. package/tests-unit/at-rules-targeted/at-rules-targeted.css +5 -3
  53. package/tests-unit/at-rules-targeted/legacy/at-rules-targeted.css +55 -0
  54. package/tests-unit/calc/calc.css +8 -8
  55. package/tests-unit/calc/calc.less +1 -0
  56. package/tests-unit/calc/legacy/calc.css +32 -0
  57. package/tests-unit/color-functions/basic.css +1 -1
  58. package/tests-unit/color-functions/comprehensive.css +5 -5
  59. package/tests-unit/color-functions/comprehensive.less +1 -0
  60. package/tests-unit/color-functions/formats.css +0 -12
  61. package/tests-unit/color-functions/formats.less +0 -15
  62. package/tests-unit/color-functions/legacy/basic.css +21 -0
  63. package/tests-unit/color-functions/legacy/comprehensive.css +48 -0
  64. package/tests-unit/color-functions/legacy/modern-syntax.css +9 -0
  65. package/tests-unit/color-functions/legacy/operations.css +18 -0
  66. package/tests-unit/color-functions/legacy/rgba.css +20 -0
  67. package/tests-unit/color-functions/modern-syntax.css +4 -4
  68. package/tests-unit/color-functions/modern-syntax.less +1 -0
  69. package/tests-unit/color-functions/operations.css +1 -1
  70. package/tests-unit/color-functions/operations.less +1 -0
  71. package/tests-unit/color-functions/rgba.css +3 -3
  72. package/tests-unit/color-functions/rgba.less +3 -1
  73. package/tests-unit/comments/comments.css +5 -6
  74. package/tests-unit/comments/comments.less +2 -1
  75. package/tests-unit/comments/comments2.css +4 -6
  76. package/tests-unit/comments/comments2.less +3 -0
  77. package/tests-unit/comments/legacy/comments.css +86 -0
  78. package/tests-unit/comments/legacy/comments2.css +21 -0
  79. package/tests-unit/container/container.css +40 -83
  80. package/tests-unit/container/container.less +28 -82
  81. package/tests-unit/container/legacy/container.css +273 -0
  82. package/tests-unit/container/styles.config.ts +8 -0
  83. package/tests-unit/css-3/css-3.css +4 -4
  84. package/tests-unit/css-3/legacy/css-3.css +147 -0
  85. package/tests-unit/css-escapes/css-escapes.css +4 -4
  86. package/tests-unit/css-escapes/legacy/css-escapes.css +34 -0
  87. package/tests-unit/css-escapes/styles.config.ts +5 -0
  88. package/tests-unit/css-grid/css-grid.css +4 -1
  89. package/tests-unit/css-grid/legacy/css-grid.css +27 -0
  90. package/tests-unit/css-guards/css-guards.less +2 -1
  91. package/tests-unit/detached-rulesets/detached-rulesets.css +26 -18
  92. package/tests-unit/detached-rulesets/legacy/detached-rulesets.css +79 -0
  93. package/tests-unit/detached-rulesets/styles.config.cjs +8 -0
  94. package/tests-unit/directives-bubbling/directives-bubbling.css +16 -14
  95. package/tests-unit/extend/extend.css +22 -28
  96. package/tests-unit/extend/legacy/extend.css +79 -0
  97. package/tests-unit/extend/styles.config.ts +5 -0
  98. package/tests-unit/extend-chaining/extend-chaining.css +7 -10
  99. package/tests-unit/extend-chaining/legacy/extend-chaining.css +84 -0
  100. package/tests-unit/extend-clearfix/extend-clearfix.css +1 -3
  101. package/tests-unit/extend-clearfix/extend-clearfix.less +0 -1
  102. package/tests-unit/{extend → extend-clearfix/legacy}/extend-clearfix.css +3 -0
  103. package/tests-unit/extend-exact/extend-exact.css +25 -24
  104. package/tests-unit/extend-exact/legacy/extend-exact.css +40 -0
  105. package/tests-unit/extend-exact/styles.config.ts +5 -0
  106. package/tests-unit/extend-media/extend-media.css +9 -14
  107. package/tests-unit/extend-media/legacy/extend-media.css +27 -0
  108. package/tests-unit/extend-media/styles.config.ts +5 -0
  109. package/tests-unit/extend-nest/extend-nest.css +3 -22
  110. package/tests-unit/extend-nest/legacy/extend-nest.css +60 -0
  111. package/tests-unit/extend-selector/extend-selector.css +42 -67
  112. package/tests-unit/extend-selector/extend-selector.less +0 -15
  113. package/tests-unit/extend-selector/legacy/extend-selector.css +73 -0
  114. package/tests-unit/extend-selector/styles.config.ts +5 -0
  115. package/tests-unit/extract-and-length/extract-and-length.css +6 -5
  116. package/tests-unit/extract-and-length/extract-and-length.less +7 -2
  117. package/tests-unit/extract-and-length/legacy/extract-and-length.css +137 -0
  118. package/tests-unit/functions/functions.css +13 -24
  119. package/tests-unit/functions/functions.less +8 -21
  120. package/tests-unit/functions/legacy/functions.css +244 -0
  121. package/tests-unit/functions/legacy/functions.less +296 -0
  122. package/tests-unit/functions-each/functions-each.css +4 -2
  123. package/tests-unit/import/import/import-reference.less +1 -1
  124. package/tests-unit/import/import-reference-issues.css +6 -6
  125. package/tests-unit/import/import-reference.css +9 -5
  126. package/tests-unit/import/import.css +1 -1
  127. package/tests-unit/import/legacy/import-reference-issues.css +27 -0
  128. package/tests-unit/import/legacy/import-reference.css +101 -0
  129. package/tests-unit/import/styles.config.cjs +3 -4
  130. package/tests-unit/layer/layer.css +30 -28
  131. package/tests-unit/layer/legacy/layer.css +136 -0
  132. package/tests-unit/layer/styles.config.ts +5 -0
  133. package/tests-unit/math-css-vars/math-css-vars.css +1 -0
  134. package/tests-unit/math-css-vars/math-css-vars.less +1 -0
  135. package/tests-unit/media/legacy/media.css +274 -0
  136. package/tests-unit/media/media.css +49 -43
  137. package/tests-unit/media/media.less +0 -2
  138. package/tests-unit/media/styles.config.cjs +5 -0
  139. package/tests-unit/merge/merge.css +2 -2
  140. package/tests-unit/mixin-noparens/legacy/mixin-noparens.css +10 -0
  141. package/tests-unit/mixin-noparens/mixin-noparens.css +4 -2
  142. package/tests-unit/mixin-noparens/styles.config.ts +5 -0
  143. package/tests-unit/mixins/legacy/maps.css +9 -0
  144. package/tests-unit/mixins/legacy/mixins.css +147 -0
  145. package/tests-unit/mixins/maps.css +7 -5
  146. package/tests-unit/mixins/mixins.css +7 -5
  147. package/tests-unit/mixins/styles.config.ts +3 -0
  148. package/tests-unit/mixins-closure/legacy/mixins-closure.css +12 -0
  149. package/tests-unit/mixins-closure/mixins-closure.css +4 -2
  150. package/tests-unit/mixins-closure/styles.config.ts +5 -0
  151. package/tests-unit/mixins-guards/legacy/mixins-guards.css +214 -0
  152. package/tests-unit/mixins-guards/mixins-guards.css +21 -5
  153. package/tests-unit/mixins-guards/mixins-guards.less +0 -1
  154. package/tests-unit/mixins-guards/styles.config.ts +5 -0
  155. package/tests-unit/mixins-guards-default-func/legacy/mixins-guards-default-func.css +132 -0
  156. package/tests-unit/mixins-guards-default-func/mixins-guards-default-func.css +0 -2
  157. package/tests-unit/mixins-important/mixins-important.css +33 -19
  158. package/tests-unit/mixins-interpolated/legacy/mixins-interpolated.css +42 -0
  159. package/tests-unit/mixins-interpolated/mixins-interpolated.css +24 -14
  160. package/tests-unit/mixins-interpolated/styles.config.ts +5 -0
  161. package/tests-unit/mixins-nested/legacy/mixins-nested.css +17 -0
  162. package/tests-unit/mixins-nested/mixins-nested.css +16 -12
  163. package/tests-unit/mixins-nested/styles.config.ts +5 -0
  164. package/tests-unit/nesting/legacy/nesting.css +27 -0
  165. package/tests-unit/nesting/nesting-uncollapsed.css +26 -0
  166. package/tests-unit/nesting/nesting.css +1 -1
  167. package/tests-unit/nesting/styles.config.ts +6 -0
  168. package/tests-unit/operations/legacy/operations-advanced.css +36 -0
  169. package/tests-unit/operations/operations-advanced.css +1 -1
  170. package/tests-unit/operations/operations.css +4 -2
  171. package/tests-unit/parse-interpolation/legacy/parse-interpolation.css +39 -0
  172. package/tests-unit/parse-interpolation/parse-interpolation.css +72 -35
  173. package/tests-unit/parse-interpolation/parse-interpolation.less +73 -25
  174. package/tests-unit/parse-interpolation/styles.config.ts +5 -0
  175. package/tests-unit/parser-property-interp/parser-property-interp.css +1 -1
  176. package/tests-unit/parser-property-interp/parser-property-interp.less +2 -2
  177. package/tests-unit/parser-slashed-combinator/parser-slashed-combinator.css +1 -9
  178. package/tests-unit/parser-slashed-combinator/parser-slashed-combinator.less +11 -11
  179. package/tests-unit/plugin/styles.config.ts +11 -0
  180. package/tests-unit/property-accessors/legacy/property-accessors.css +60 -0
  181. package/tests-unit/property-accessors/property-accessors.css +15 -7
  182. package/tests-unit/property-name-interp/legacy/property-name-interp.css +24 -0
  183. package/tests-unit/property-name-interp/property-name-interp.css +1 -1
  184. package/tests-unit/property-name-interp/property-name-interp.less +4 -2
  185. package/tests-unit/property-targeted/legacy/property-targeted.css +7 -0
  186. package/tests-unit/property-targeted/property-targeted.css +1 -1
  187. package/tests-unit/rulesets/legacy/rulesets.css +31 -0
  188. package/tests-unit/rulesets/rulesets.css +30 -30
  189. package/tests-unit/rulesets/styles.config.ts +5 -0
  190. package/tests-unit/scope/legacy/scope.css +41 -0
  191. package/tests-unit/scope/scope.css +1 -1
  192. package/tests-unit/scope/styles.config.cjs +8 -0
  193. package/tests-unit/selectors/selectors.css +13 -41
  194. package/tests-unit/styles.config.cjs +1 -1
  195. package/tests-unit/styles.config.ts +8 -0
  196. package/tests-unit/variables/legacy/variable-advanced.css +58 -0
  197. package/tests-unit/variables/variable-advanced.css +15 -18
  198. package/tests-unit/variables/variable-advanced.less +5 -4
  199. package/tests-unit/variables/variables.css +1 -1
  200. package/tests-unit/variables-in-at-rules/variables-in-at-rules.less +3 -2
  201. package/tests-unit/whitespace/legacy/whitespace.css +45 -0
  202. package/tests-unit/whitespace/whitespace.css +3 -2
  203. package/tests-warnings/parentless-ampersand-nested.less +6 -0
  204. package/tests-warnings/parentless-ampersand-nested.txt +42 -0
  205. package/tests-warnings/parentless-ampersand.less +3 -0
  206. package/tests-warnings/parentless-ampersand.txt +21 -0
  207. package/tests-config/rootpath-escape-interpolation/rootpath-escape-interpolation.css +0 -8
  208. package/tests-config/rootpath-escape-interpolation/rootpath-escape-interpolation.less +0 -24
  209. package/tests-config/rootpath-escape-interpolation/styles.config.cjs +0 -8
  210. package/tests-config/sourcemaps/url-interpolation/styles.config.cjs +0 -9
  211. package/tests-config/sourcemaps/url-interpolation/url-interpolation.css +0 -13
  212. package/tests-config/sourcemaps/url-interpolation/url-interpolation.less +0 -24
  213. package/tests-error/eval/mixin-as-value.less +0 -6
  214. package/tests-error/eval/mixin-as-value.txt +0 -4
  215. package/tests-error/parse/property-interpolation-lookup.less +0 -8
  216. package/tests-error/parse/property-interpolation-lookup.txt +0 -4
  217. package/tests-unit/extend/extend-clearfix.less +0 -19
  218. package/tests-unit/lookup-interpolation/lookup-interpolation.css +0 -60
  219. package/tests-unit/lookup-interpolation/lookup-interpolation.less +0 -127
  220. package/tests-unit/media-nested-type/media-nested-type.css +0 -40
  221. package/tests-unit/media-nested-type/media-nested-type.less +0 -51
  222. /package/tests-unit/{directives-bubbling/directives-bubbling.less → at-rules-bubbling/at-rules-bubbling.less} +0 -0
  223. /package/tests-unit/{ie-filters → ie-filters-REMOVED/legacy}/ie-filters.css +0 -0
  224. /package/tests-unit/{ie-filters → ie-filters-REMOVED/legacy}/ie-filters.less +0 -0
  225. /package/tests-unit/{javascript → javascript-REMOVED/legacy}/javascript.css +0 -0
  226. /package/tests-unit/{javascript → javascript-REMOVED/legacy}/javascript.less +0 -0
  227. /package/tests-unit/{javascript → javascript-REMOVED/legacy}/styles.config.cjs +0 -0
@@ -0,0 +1,296 @@
1
+ #built-in {
2
+ @r: 32;
3
+ escaped: e("-Some::weird(#thing, y)");
4
+ lighten: lighten(#ff0000, 40%);
5
+ lighten-relative: lighten(#ff0000, 40%, relative);
6
+ darken: darken(#ff0000, 40%);
7
+ darken-relative: darken(#ff0000, 40%, relative);
8
+ saturate: saturate(#29332f, 20%);
9
+ saturate-relative: saturate(#29332f, 20%, relative);
10
+ desaturate: desaturate(#203c31, 20%);
11
+ desaturate-relative: desaturate(#203c31, 20%, relative);
12
+ greyscale: greyscale(#203c31);
13
+ hsl-clamp: hsl(380, 150%, 150%);
14
+ spin-p: spin(hsl(340, 50%, 50%), 40);
15
+ spin-n: spin(hsl(30, 50%, 50%), -40);
16
+ luma-white: luma(#fff);
17
+ luma-black: luma(#000);
18
+ luma-black-alpha: luma(rgba(0,0,0,0.5));
19
+ luma-red: luma(#ff0000);
20
+ luma-green: luma(#00ff00);
21
+ luma-blue: luma(#0000ff);
22
+ luma-yellow: luma(#ffff00);
23
+ luma-cyan: luma(#00ffff);
24
+ luma-differs-from-luminance: luma(#ff3600);
25
+ luminance-white: luma(#fff);
26
+ luminance-black: luma(#000);
27
+ luminance-black-alpha: luma(rgba(0,0,0,0.5));
28
+ luminance-red: luma(#ff0000);
29
+ luminance-differs-from-luma: luminance(#ff3600);
30
+ contrast-filter: contrast(30%);
31
+ saturate-filter: saturate(5%);
32
+ contrast-white: contrast(#fff);
33
+ contrast-black: contrast(#000);
34
+ contrast-red: contrast(#ff0000);
35
+ contrast-green: contrast(#00ff00);
36
+ contrast-blue: contrast(#0000ff);
37
+ contrast-yellow: contrast(#ffff00);
38
+ contrast-cyan: contrast(#00ffff);
39
+ contrast-light: contrast(#fff, #111111, #eeeeee);
40
+ contrast-dark: contrast(#000, #111111, #eeeeee);
41
+ contrast-wrongorder: contrast(#fff, #eeeeee, #111111, 0.5);
42
+ contrast-light-thresh: contrast(#fff, #111111, #eeeeee, 0.5);
43
+ contrast-dark-thresh: contrast(#000, #111111, #eeeeee, 0.5);
44
+ contrast-high-thresh: contrast(#555, #111111, #eeeeee, 0.6);
45
+ contrast-low-thresh: contrast(#555, #111111, #eeeeee, 0.09);
46
+ contrast-light-thresh-per: contrast(#fff, #111111, #eeeeee, 50%);
47
+ contrast-dark-thresh-per: contrast(#000, #111111, #eeeeee, 50%);
48
+ contrast-high-thresh-per: contrast(#555, #111111, #eeeeee, 60%);
49
+ contrast-low-thresh-per: contrast(#555, #111111, #eeeeee, 9%);
50
+ replace: replace("Hello, Mars.", "Mars\.", "World!");
51
+ replace-captured: replace("This is a string.", "(string)\.$", "new $1.");
52
+ replace-with-flags: replace("One + one = 4", "one", "2", "gi");
53
+ replace-single-quoted: replace('foo-1', "1", "2");
54
+ replace-escaped-string: replace(~"bar-1", "1", "2");
55
+ replace-keyword: replace(baz-1, "1", "2");
56
+ replace-with-color: replace("007", "0", #135, g);
57
+ replace-with-number: replace("007", "0", 2em);
58
+ format: %("rgb(%d, %d, %d)", @r, 128, 64);
59
+ format-string: %("hello %s", "world");
60
+ format-multiple: %("hello %s %d", "earth", 2);
61
+ format-url-encode: %("red is %A", #ff0000);
62
+ format-single-quoted: %('hello %s', "single world");
63
+ format-escaped-string: %(~"hello %s", "escaped world");
64
+ format-color-as-string: %("%s", #123);
65
+ format-number-as-string: %("%s", 4px);
66
+ eformat: e(%("rgb(%d, %d, %d)", @r, 128, 64));
67
+
68
+ unitless: unit(12px);
69
+ unit: unit((13px + 1px), em);
70
+ unitpercentage: unit(100, %);
71
+
72
+ get-unit: get-unit(10px);
73
+ get-unit-empty: get-unit(10);
74
+
75
+ hue: hue(hsl(98, 12%, 95%));
76
+ saturation: saturation(hsl(98, 12%, 95%));
77
+ lightness: lightness(hsl(98, 12%, 95%));
78
+ hsvhue: hsvhue(hsv(98, 12%, 95%));
79
+ hsvsaturation: hsvsaturation(hsv(98, 12%, 95%));
80
+ hsvvalue: hsvvalue(hsv(98, 12%, 95%));
81
+ red: red(#f00);
82
+ green: green(#0f0);
83
+ blue: blue(#00f);
84
+ rounded: round((@r/3));
85
+ rounded-two: round((@r/3), 2);
86
+ roundedpx: round((10px / 3));
87
+ roundedpx-three: round((10px / 3), 3);
88
+ rounded-percentage: round(10.2%);
89
+ ceil: ceil(10.1px);
90
+ floor: floor(12.9px);
91
+ sqrt: sqrt(25px);
92
+ pi: pi();
93
+ mod: mod(13m, 11cm); // could take into account units, doesn't at the moment
94
+ abs: abs(-4%);
95
+ tan: tan(42deg);
96
+ sin: sin(10deg);
97
+ cos: cos(12);
98
+ atan: atan(tan(0.1rad));
99
+ atan: convert(acos(cos(34deg)), deg);
100
+ atan: convert(acos(cos(50grad)), deg);
101
+ pow: pow(8px, 2);
102
+ pow: pow(4, 3);
103
+ pow: pow(3, 3em);
104
+ min: min(0);
105
+ min: min(6, 5);
106
+ min: min(1pt, 3pt);
107
+ min: min(1cm, 3mm);
108
+ min: min(6em, 5, 4ex, 3, 2pt, 1);
109
+ min: min(calc(1 + 1), 1);
110
+ min: min(~'var(--width), 802px');
111
+ max: max(1, 3);
112
+ max: max(3em, 1em, 2em, 5em);
113
+ max: max(1px, 2, 3em, 4, 5m, 6);
114
+ max: min(var(--body-max-width), calc(100vw - 20px));
115
+ max: max(1, calc(1 + 1));
116
+ max-native: max(10vw, 100px);
117
+ percentage: percentage((10px / 50));
118
+ color-quoted-digit: color("#dda0dd");
119
+ color-quoted-keyword: color("plum");
120
+ color-color: color(#dda0dd);
121
+ color-keyword: color(plum);
122
+ tint: tint(#777777, 13);
123
+ tint-full: tint(#777777, 100);
124
+ tint-percent: tint(#777777, 13%);
125
+ tint-negative: tint(#777777, -13%);
126
+ shade: shade(#777777, 13);
127
+ shade-full: shade(#777777, 100);
128
+ shade-percent: shade(#777777, 13%);
129
+ shade-negative: shade(#777777, -13%);
130
+
131
+ fade-out: fadeout(red, 5%); // support fadeOut and fadeout
132
+ fade-in: fadein(fadeout(red, 10%), 5%);
133
+ fade-out-relative: fadeout(red, 5%,relative);
134
+ fade-in-relative: fadein(fadeout(red, 10%, relative), 5%, relative);
135
+ fade-out2: fadeout(fadeout(red, 50%), 50%);
136
+ fade-out2-relative: fadeout(fadeout(red, 50%, relative), 50%, relative);
137
+
138
+ hsv: hsv(5, 50%, 30%);
139
+ hsva: hsva(3, 50%, 30%, 0.2);
140
+
141
+ mix: mix(#ff0000, #ffff00, 80);
142
+ mix-0: mix(#ff0000, #ffff00, 0);
143
+ mix-100: mix(#ff0000, #ffff00, 100);
144
+ mix-weightless: mix(#ff0000, #ffff00);
145
+ mixt: mix(#ff0000, transparent);
146
+
147
+ .is-a {
148
+ @rules: {
149
+ color: red;
150
+ };
151
+ rules-defined: isdefined(@rules);
152
+ foo-defined: isdefined(@foo);
153
+ ruleset: isruleset(@rules);
154
+ color: iscolor(#ddd);
155
+ color1: iscolor(red);
156
+ color2: iscolor(rgb(0, 0, 0));
157
+ color3: iscolor(transparent);
158
+ keyword: iskeyword(hello);
159
+ number: isnumber(32);
160
+ string: isstring("hello");
161
+ pixel: ispixel(32px);
162
+ percent: ispercentage(32%);
163
+ em: isem(32em);
164
+ ex: isunit(32ex, ex);
165
+ rem: isunit(32rem, rem);
166
+ vw: isunit(32vw, vw);
167
+ vh: isunit(32vh, vh);
168
+ vmin: isunit(32vmin, vmin);
169
+ vmax: isunit(32vmax, vmax);
170
+ ch: isunit(32ch, ch);
171
+ cm: isunit(32cm, cm);
172
+ mm: isunit(32mm, mm);
173
+ pt: isunit(32pt, pt);
174
+ q: isunit(32q, q);
175
+ in: isunit(32in, in);
176
+ cat: isunit(32cat, cat);
177
+ no-unit-is-empty: isunit(32, '');
178
+ case-insensitive-1: isunit(32CAT, cat);
179
+ case-insensitive-2: isunit(32px, PX);
180
+ }
181
+ }
182
+
183
+ #alpha {
184
+ alpha: darken(hsla(25, 50%, 50%, 0.6), 10%);
185
+ alpha2: alpha(rgba(3, 4, 5, 0.5));
186
+ alpha3: alpha(transparent);
187
+ }
188
+
189
+ #blendmodes {
190
+ multiply: multiply(#f60000, #f60000);
191
+ screen: screen(#f60000, #0000f6);
192
+ overlay: overlay(#f60000, #0000f6);
193
+ softlight: softlight(#f60000, #ffffff);
194
+ hardlight: hardlight(#f60000, #0000f6);
195
+ difference: difference(#f60000, #0000f6);
196
+ exclusion: exclusion(#f60000, #0000f6);
197
+ average: average(#f60000, #0000f6);
198
+ negation: negation(#f60000, #313131);
199
+ }
200
+
201
+ #extract-and-length {
202
+ @anon: A B C 1 2 3;
203
+ extract: extract(@anon, 6) extract(@anon, 5) extract(@anon, 4) extract(@anon, 3) extract(@anon, 2) extract(@anon, 1);
204
+ length: length(@anon);
205
+ }
206
+
207
+ #quoted-functions-in-mixin {
208
+ // Quoted type may have some weird side-effects when used in mixins (#2308)
209
+ .mixin();
210
+ .mixin() {
211
+ replace-double-quoted: replace('foo-1', "1", "2");
212
+ replace-single-quoted: replace('foo-3', "3", "4");
213
+ replace-escaped-string: replace(~"bar-1", "1", "2");
214
+ replace-keyword: replace(baz-1, "1", "2");
215
+ replace-anonymous: replace(e("qux-1"), "1", "2");
216
+ format-double-quoted: %("hello %s", "world");
217
+ format-single-quoted: %('hello %s', "single world");
218
+ format-escaped-string: %(~"hello %s", "escaped world");
219
+ format-keyword: %(hello);
220
+ format-anonymous: %(e("hello %s"), "anonymous world");
221
+ }
222
+ }
223
+
224
+ #list-details {
225
+ @list:
226
+ a 1, // Some comment
227
+ b 2;
228
+
229
+ length: length(@list);
230
+ one: extract(@list, 1);
231
+ @two: extract(@list, 2);
232
+ two: @two;
233
+ two-length: length(@two);
234
+ two-one: extract(@two, 1);
235
+ two-two: extract(@two, 2);
236
+ }
237
+ @color1: #FFF;/* comment1 */
238
+ @color2: #FFF/* comment2 */;
239
+ html {
240
+ color: mix(blue, @color1, 50%);
241
+ color: mix(blue, @color2, 50%);
242
+ }
243
+
244
+ #boolean {
245
+ a: boolean(not(2 < 1));
246
+ b: boolean(not(2 > 1) and (true));
247
+ c: boolean(not(boolean(true)));
248
+ }
249
+
250
+ #if {
251
+ a: if(not(false), 1, 2);
252
+ b: if(not(true), 1, 2);
253
+ @block1: if(not(false), {c: 3}, {d: 4}); @block1();
254
+
255
+ --e: if(not(true), 5);
256
+ @f: boolean(3 = 4);
257
+ f: if(not(@f), 6);
258
+ g: if(true, 3, 5);
259
+ h: if(false, 3, 5);
260
+ i: if(true and isnumber(6), 6, 8);
261
+ j: if(not(true) and true, 6, 8);
262
+ k: if(true or true, 1);
263
+
264
+ // see: https://github.com/less/less.js/issues/3371
265
+ @some: foo;
266
+ l: if((iscolor(@some)), darken(@some, 10%), black);
267
+
268
+
269
+ if((false), {g: 7}); /* results in void */
270
+
271
+ @conditional: if((true), {
272
+ color: green;
273
+ }, {});
274
+ @conditional();
275
+
276
+ @falsey: if((false), {
277
+ color: orange;
278
+ }, {
279
+ color: purple;
280
+ });
281
+ @falsey();
282
+ }
283
+
284
+ .paren-escapes {
285
+ list-1: ~(1, 2, 3);
286
+ length-1: length($list-1);
287
+ each(~(1 2 3); {
288
+ item-@{value}: @value + 3;
289
+ })
290
+
291
+ .mixin(@list-1; @list-2) {
292
+ list-2: @list-1;
293
+ list-3: @list-2;
294
+ }
295
+ .mixin($list-1, ~(7; 8; 9));
296
+ }
@@ -8,16 +8,15 @@
8
8
  a: b;
9
9
  }
10
10
  .each {
11
- index: 1, 2, 3, 4;
12
11
  item1: a;
13
12
  item2: b;
14
13
  item3: c;
14
+ index: 1, 2, 3, 4;
15
15
  item4: d;
16
16
  nest-1-1: 10px 1;
17
17
  nest-2-1: 15px 2;
18
18
  nest-1-2: 20px 1;
19
19
  nest-2-2: 25px 2;
20
- padding: 10px 20px 30px 40px;
21
20
  }
22
21
  .each .nest-anon {
23
22
  nest-1-1: a c;
@@ -25,6 +24,9 @@
25
24
  nest-2-1: b c;
26
25
  nest-2-2: b d;
27
26
  }
27
+ .each {
28
+ padding: 10px 20px 30px 40px;
29
+ }
28
30
  .set {
29
31
  one: blue;
30
32
  two: green;
@@ -4,7 +4,7 @@
4
4
  color: green;
5
5
  }
6
6
  }
7
- .only-with-visible,
7
+ .stays-invisible,
8
8
  .z {
9
9
  color: green;
10
10
  &:hover {
@@ -8,12 +8,12 @@ show-all-content {
8
8
  /*
9
9
  tralala
10
10
  */
11
- }
12
- show-all-content .fix {
13
- fix: fix;
14
- }
15
- show-all-content .something {
16
- inside: something;
11
+ .fix {
12
+ fix: fix;
13
+ }
14
+ .something {
15
+ inside: something;
16
+ }
17
17
  }
18
18
  #used-namespaced-mixin {
19
19
  was: included;
@@ -24,13 +24,12 @@ div#id.class[a=one][b=two].class:not(.one) {
24
24
  .visible:hover {
25
25
  color: green;
26
26
  }
27
- .only-with-visible + .visible,
28
- .visible + .only-with-visible,
27
+ .visible {
28
+ color: green;
29
+ }
29
30
  .visible + .visible {
30
31
  color: green;
31
32
  }
32
- .only-with-visible + .visible .sub,
33
- .visible + .only-with-visible .sub,
34
33
  .visible + .visible .sub {
35
34
  color: green;
36
35
  }
@@ -44,14 +43,19 @@ div#id.class[a=one][b=two].class:not(.one) {
44
43
  }
45
44
  .b {
46
45
  color: red;
47
- color: green;
48
46
  }
49
47
  .b .c {
50
48
  color: green;
51
49
  }
50
+ .b {
51
+ color: green;
52
+ }
52
53
  .b:hover {
53
54
  color: green;
54
55
  }
56
+ .b {
57
+ color: green;
58
+ }
55
59
  .b + .b {
56
60
  color: green;
57
61
  }
@@ -7,7 +7,7 @@
7
7
  color: red;
8
8
  width: 10px;
9
9
  height: 30%;
10
- value: 3.141592653589793;
10
+ value: 3.1415926536;
11
11
  }
12
12
  @media screen and (max-width: 600px) {
13
13
  body {
@@ -0,0 +1,27 @@
1
+ /* Less 4.x output, recorded when this fixture graduated to v5.
2
+ Historical record only — no test reads this file. */
3
+
4
+ .test-rule-c {
5
+ background-color: green;
6
+ }
7
+ .theOnlySelector {
8
+ shall-have: one selector;
9
+ }
10
+ show-all-content {
11
+ /*
12
+ tralala
13
+ */
14
+ }
15
+ show-all-content .fix {
16
+ fix: fix;
17
+ }
18
+ show-all-content .something {
19
+ inside: something;
20
+ }
21
+ #used-namespaced-mixin {
22
+ was: included;
23
+ shall-see: another property above;
24
+ }
25
+ call-mixin-with-import-by-reference-inside {
26
+ the-only-property: nothing-below-this;
27
+ }
@@ -0,0 +1,101 @@
1
+ /* Less 4.x output, recorded when this fixture graduated to v5.
2
+ Historical record only — no test reads this file. */
3
+
4
+ input[type="text"].class#id[attr=i32]:not(.one) {
5
+ color: inherit;
6
+ }
7
+ div#id.class[a=one][b=two].class:not(.one) {
8
+ color: inherit;
9
+ }
10
+ @media print {
11
+ .class {
12
+ color: blue;
13
+ }
14
+ .class .sub {
15
+ width: 42;
16
+ }
17
+ }
18
+ .visible {
19
+ color: red;
20
+ }
21
+ .visible .c {
22
+ color: green;
23
+ }
24
+ .visible {
25
+ color: green;
26
+ }
27
+ .visible:hover {
28
+ color: green;
29
+ }
30
+ .visible + .visible {
31
+ color: green;
32
+ }
33
+ .visible + .visible .sub {
34
+ color: green;
35
+ }
36
+ @supports (something: else) {
37
+ .class {
38
+ something: else;
39
+ }
40
+ .nestedToo .class {
41
+ something: else;
42
+ }
43
+ }
44
+ .b {
45
+ color: red;
46
+ }
47
+ .b .c {
48
+ color: green;
49
+ }
50
+ .b {
51
+ color: green;
52
+ }
53
+ .b:hover {
54
+ color: green;
55
+ }
56
+ .b {
57
+ color: green;
58
+ }
59
+ .b + .b {
60
+ color: green;
61
+ }
62
+ .b + .b .sub {
63
+ color: green;
64
+ }
65
+ .y {
66
+ pulled-in: yes /* inline comment survives */;
67
+ }
68
+ /* comment pulled in */
69
+ .visible {
70
+ extend: test;
71
+ }
72
+ .test-rule-mediaq-import {
73
+ color: green;
74
+ test: 340px;
75
+ }
76
+ @media (max-size: 450px) {
77
+ .test-rule-mediaq-import {
78
+ color: red;
79
+ }
80
+ }
81
+ .test-rule {
82
+ color: red;
83
+ }
84
+ .test-rule:first-child {
85
+ color: blue;
86
+ }
87
+ @keyframes some-name {
88
+ property: value;
89
+ }
90
+ @supports (animation-name: test) {
91
+ @keyframes some-name {
92
+ property: value;
93
+ }
94
+ .selector {
95
+ color: red;
96
+ }
97
+ }
98
+ div {
99
+ this isn't very valid CSS.
100
+ }
101
+ this isn't very valid CSS.
@@ -1,7 +1,6 @@
1
1
  module.exports = {
2
2
  language: {
3
- less: {
4
- "syncImport": true
5
- }
6
- }
3
+ less: {}
4
+ },
5
+ output: { collapseNesting: false }
7
6
  };
@@ -3,14 +3,18 @@
3
3
  @import url("/import/layer-import-4.css") layer(print) print;
4
4
  @import url("/import/layer-import-4.css") layer(print) print, (max-width: 600px);
5
5
  @import url("/import/layer-import-5.css") layer(features) supports(display: grid);
6
- @layer {
7
- .main::before {
8
- color: #f00;
6
+ .main {
7
+ @layer {
8
+ &::before {
9
+ color: #f00;
10
+ }
9
11
  }
10
12
  }
11
13
  @layer legacy {
12
- .sub-rule ul {
13
- color: white;
14
+ .sub-rule {
15
+ ul {
16
+ color: white;
17
+ }
14
18
  }
15
19
  }
16
20
  @layer primevue {
@@ -30,10 +34,10 @@
30
34
  body {
31
35
  margin: 0;
32
36
  font-family: system-ui, sans-serif;
33
- }
34
- body header {
35
- background-color: #f0f0f0;
36
- padding: 1rem;
37
+ header {
38
+ background-color: #f0f0f0;
39
+ padding: 1rem;
40
+ }
37
41
  }
38
42
  }
39
43
  @layer components {
@@ -42,9 +46,9 @@
42
46
  padding: 0.5rem 1rem;
43
47
  background-color: blue;
44
48
  color: white;
45
- }
46
- .button:hover {
47
- background-color: darkblue;
49
+ &:hover {
50
+ background-color: darkblue;
51
+ }
48
52
  }
49
53
  }
50
54
  @layer utilities {
@@ -53,21 +57,19 @@
53
57
  }
54
58
  .responsive {
55
59
  width: 100%;
56
- }
57
- @media (min-width: 768px) {
58
- .responsive {
60
+ @media (min-width: 768px) {
59
61
  width: 50%;
60
62
  }
61
63
  }
62
64
  }
63
65
  .parent {
64
66
  color: black;
65
- }
66
- .parent .child {
67
- color: red;
68
- }
69
- .parent:hover {
70
- background: lightgray;
67
+ .child {
68
+ color: red;
69
+ }
70
+ &:hover {
71
+ background: lightgray;
72
+ }
71
73
  }
72
74
  @layer foo.baz {
73
75
  .bar {
@@ -99,9 +101,9 @@ body {
99
101
  @layer components {
100
102
  .btn {
101
103
  color: red;
102
- }
103
- .btn:hover {
104
- color: blue;
104
+ &:hover {
105
+ color: blue;
106
+ }
105
107
  }
106
108
  }
107
109
  @layer {
@@ -117,10 +119,10 @@ body {
117
119
  }
118
120
  .feature {
119
121
  color: gray;
120
- }
121
- @layer component {
122
- .feature h2 {
123
- font-size: 1.5rem;
122
+ @layer component {
123
+ h2 {
124
+ font-size: 1.5rem;
125
+ }
124
126
  }
125
127
  }
126
128
  @layer ui {