@less/test-data 4.9.0 → 5.0.0-alpha.2

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 (211) 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-config/units/no-strict/legacy/no-strict.css +24 -0
  24. package/tests-config/units/no-strict/no-strict.css +3 -3
  25. package/tests-config/url-args/legacy/urls.css +58 -0
  26. package/tests-config/url-args/urls.css +2 -1
  27. package/tests-error/eval/ampersand-merge-template-invalid.less +7 -0
  28. package/tests-error/eval/ampersand-merge-template-invalid.txt +1 -0
  29. package/tests-error/eval/at-rules-undefined-var.less +1 -1
  30. package/tests-error/eval/property-undefined.txt +1 -0
  31. package/tests-error/eval/recursive-property.txt +1 -0
  32. package/tests-unit/at-rule-variable-deprecated/at-rule-variable-deprecated.css +0 -38
  33. package/tests-unit/at-rule-variable-deprecated/at-rule-variable-deprecated.less +0 -70
  34. package/tests-unit/at-rule-variable-interpolation/at-rule-variable-interpolation.css +45 -0
  35. package/tests-unit/at-rule-variable-interpolation/at-rule-variable-interpolation.less +72 -0
  36. package/tests-unit/at-rules/at-rules.css +8 -6
  37. package/tests-unit/at-rules/legacy/at-rules.css +110 -0
  38. package/tests-unit/at-rules/styles.config.ts +5 -0
  39. package/tests-unit/at-rules-bubbling/at-rules-bubbling.css +121 -0
  40. package/tests-unit/at-rules-bubbling/legacy/at-rules-bubbling.css +122 -0
  41. package/tests-unit/at-rules-keyword-comments/at-rules-keyword-comments.css +2 -5
  42. package/tests-unit/at-rules-keyword-comments/legacy/at-rules-keyword-comments.css +12 -0
  43. package/tests-unit/at-rules-targeted/at-rules-targeted.css +5 -3
  44. package/tests-unit/at-rules-targeted/legacy/at-rules-targeted.css +55 -0
  45. package/tests-unit/calc/calc.css +8 -8
  46. package/tests-unit/calc/calc.less +1 -0
  47. package/tests-unit/calc/legacy/calc.css +32 -0
  48. package/tests-unit/color-functions/basic.css +1 -1
  49. package/tests-unit/color-functions/comprehensive.css +5 -5
  50. package/tests-unit/color-functions/comprehensive.less +1 -0
  51. package/tests-unit/color-functions/formats.css +0 -12
  52. package/tests-unit/color-functions/formats.less +0 -15
  53. package/tests-unit/color-functions/legacy/basic.css +21 -0
  54. package/tests-unit/color-functions/legacy/comprehensive.css +48 -0
  55. package/tests-unit/color-functions/legacy/modern-syntax.css +9 -0
  56. package/tests-unit/color-functions/legacy/operations.css +18 -0
  57. package/tests-unit/color-functions/legacy/rgba.css +20 -0
  58. package/tests-unit/color-functions/modern-syntax.css +4 -4
  59. package/tests-unit/color-functions/modern-syntax.less +1 -0
  60. package/tests-unit/color-functions/operations.less +1 -0
  61. package/tests-unit/color-functions/rgba.css +3 -3
  62. package/tests-unit/color-functions/rgba.less +3 -1
  63. package/tests-unit/comments/comments.css +5 -6
  64. package/tests-unit/comments/comments.less +2 -1
  65. package/tests-unit/comments/comments2.css +4 -6
  66. package/tests-unit/comments/comments2.less +3 -0
  67. package/tests-unit/comments/legacy/comments.css +86 -0
  68. package/tests-unit/comments/legacy/comments2.css +21 -0
  69. package/tests-unit/container/container.css +40 -83
  70. package/tests-unit/container/container.less +28 -82
  71. package/tests-unit/container/legacy/container.css +273 -0
  72. package/tests-unit/container/styles.config.ts +8 -0
  73. package/tests-unit/css-3/css-3.css +4 -4
  74. package/tests-unit/css-3/legacy/css-3.css +147 -0
  75. package/tests-unit/css-escapes/css-escapes.css +4 -4
  76. package/tests-unit/css-escapes/legacy/css-escapes.css +34 -0
  77. package/tests-unit/css-escapes/styles.config.ts +5 -0
  78. package/tests-unit/css-grid/css-grid.css +4 -1
  79. package/tests-unit/css-grid/legacy/css-grid.css +27 -0
  80. package/tests-unit/css-guards/css-guards.less +2 -1
  81. package/tests-unit/detached-rulesets/detached-rulesets.css +26 -18
  82. package/tests-unit/detached-rulesets/legacy/detached-rulesets.css +79 -0
  83. package/tests-unit/directives-bubbling/directives-bubbling.css +16 -14
  84. package/tests-unit/extend/extend.css +22 -28
  85. package/tests-unit/extend/legacy/extend.css +79 -0
  86. package/tests-unit/extend/styles.config.ts +5 -0
  87. package/tests-unit/extend-chaining/extend-chaining.css +7 -10
  88. package/tests-unit/extend-chaining/legacy/extend-chaining.css +84 -0
  89. package/tests-unit/extend-clearfix/extend-clearfix.css +1 -3
  90. package/tests-unit/extend-clearfix/extend-clearfix.less +0 -1
  91. package/tests-unit/{extend → extend-clearfix/legacy}/extend-clearfix.css +3 -0
  92. package/tests-unit/extend-exact/extend-exact.css +25 -24
  93. package/tests-unit/extend-exact/legacy/extend-exact.css +40 -0
  94. package/tests-unit/extend-exact/styles.config.ts +5 -0
  95. package/tests-unit/extend-media/extend-media.css +9 -14
  96. package/tests-unit/extend-media/legacy/extend-media.css +27 -0
  97. package/tests-unit/extend-media/styles.config.ts +5 -0
  98. package/tests-unit/extend-nest/extend-nest.css +3 -22
  99. package/tests-unit/extend-nest/legacy/extend-nest.css +60 -0
  100. package/tests-unit/extend-selector/extend-selector.css +42 -67
  101. package/tests-unit/extend-selector/extend-selector.less +0 -15
  102. package/tests-unit/extend-selector/legacy/extend-selector.css +73 -0
  103. package/tests-unit/extend-selector/styles.config.ts +5 -0
  104. package/tests-unit/extract-and-length/extract-and-length.css +6 -5
  105. package/tests-unit/extract-and-length/extract-and-length.less +7 -2
  106. package/tests-unit/extract-and-length/legacy/extract-and-length.css +137 -0
  107. package/tests-unit/functions/functions.css +5 -16
  108. package/tests-unit/functions/functions.less +8 -21
  109. package/tests-unit/functions/legacy/functions.css +244 -0
  110. package/tests-unit/functions/legacy/functions.less +296 -0
  111. package/tests-unit/functions-each/functions-each.css +4 -2
  112. package/tests-unit/import/import-reference-issues.css +6 -6
  113. package/tests-unit/import/import-reference.css +4 -2
  114. package/tests-unit/import/legacy/import-reference-issues.css +27 -0
  115. package/tests-unit/import/legacy/import-reference.css +101 -0
  116. package/tests-unit/import/styles.config.cjs +5 -4
  117. package/tests-unit/layer/layer.css +30 -28
  118. package/tests-unit/layer/legacy/layer.css +136 -0
  119. package/tests-unit/layer/styles.config.ts +5 -0
  120. package/tests-unit/math-css-vars/math-css-vars.css +1 -0
  121. package/tests-unit/math-css-vars/math-css-vars.less +1 -0
  122. package/tests-unit/media/legacy/media.css +274 -0
  123. package/tests-unit/media/media.css +49 -43
  124. package/tests-unit/media/media.less +0 -2
  125. package/tests-unit/media/styles.config.cjs +5 -0
  126. package/tests-unit/merge/merge.css +2 -2
  127. package/tests-unit/mixin-noparens/legacy/mixin-noparens.css +10 -0
  128. package/tests-unit/mixin-noparens/mixin-noparens.css +4 -2
  129. package/tests-unit/mixin-noparens/styles.config.ts +5 -0
  130. package/tests-unit/mixins/legacy/maps.css +9 -0
  131. package/tests-unit/mixins/legacy/mixins.css +147 -0
  132. package/tests-unit/mixins/maps.css +7 -5
  133. package/tests-unit/mixins/mixins.css +7 -5
  134. package/tests-unit/mixins/styles.config.ts +5 -0
  135. package/tests-unit/mixins-closure/legacy/mixins-closure.css +12 -0
  136. package/tests-unit/mixins-closure/mixins-closure.css +4 -2
  137. package/tests-unit/mixins-closure/styles.config.ts +5 -0
  138. package/tests-unit/mixins-guards/legacy/mixins-guards.css +214 -0
  139. package/tests-unit/mixins-guards/mixins-guards.css +21 -5
  140. package/tests-unit/mixins-guards/mixins-guards.less +0 -1
  141. package/tests-unit/mixins-guards/styles.config.ts +5 -0
  142. package/tests-unit/mixins-guards-default-func/legacy/mixins-guards-default-func.css +132 -0
  143. package/tests-unit/mixins-guards-default-func/mixins-guards-default-func.css +0 -2
  144. package/tests-unit/mixins-important/mixins-important.css +33 -19
  145. package/tests-unit/mixins-interpolated/legacy/mixins-interpolated.css +42 -0
  146. package/tests-unit/mixins-interpolated/mixins-interpolated.css +24 -14
  147. package/tests-unit/mixins-interpolated/styles.config.ts +5 -0
  148. package/tests-unit/mixins-nested/legacy/mixins-nested.css +17 -0
  149. package/tests-unit/mixins-nested/mixins-nested.css +16 -12
  150. package/tests-unit/mixins-nested/styles.config.ts +5 -0
  151. package/tests-unit/nesting/legacy/nesting.css +27 -0
  152. package/tests-unit/nesting/nesting-uncollapsed.css +26 -0
  153. package/tests-unit/nesting/nesting.css +1 -1
  154. package/tests-unit/nesting/styles.config.ts +6 -0
  155. package/tests-unit/operations/legacy/operations-advanced.css +36 -0
  156. package/tests-unit/operations/operations-advanced.css +1 -1
  157. package/tests-unit/operations/operations.css +4 -2
  158. package/tests-unit/parse-interpolation/legacy/parse-interpolation.css +39 -0
  159. package/tests-unit/parse-interpolation/parse-interpolation.css +72 -35
  160. package/tests-unit/parse-interpolation/parse-interpolation.less +73 -25
  161. package/tests-unit/parse-interpolation/styles.config.ts +5 -0
  162. package/tests-unit/parser-property-interp/parser-property-interp.css +1 -1
  163. package/tests-unit/parser-property-interp/parser-property-interp.less +2 -2
  164. package/tests-unit/parser-slashed-combinator/parser-slashed-combinator.css +1 -9
  165. package/tests-unit/parser-slashed-combinator/parser-slashed-combinator.less +11 -11
  166. package/tests-unit/plugin/styles.config.ts +11 -0
  167. package/tests-unit/property-accessors/legacy/property-accessors.css +60 -0
  168. package/tests-unit/property-accessors/property-accessors.css +15 -7
  169. package/tests-unit/property-name-interp/legacy/property-name-interp.css +24 -0
  170. package/tests-unit/property-name-interp/property-name-interp.css +1 -1
  171. package/tests-unit/property-name-interp/property-name-interp.less +4 -2
  172. package/tests-unit/property-targeted/legacy/property-targeted.css +7 -0
  173. package/tests-unit/property-targeted/property-targeted.css +1 -1
  174. package/tests-unit/rulesets/legacy/rulesets.css +31 -0
  175. package/tests-unit/rulesets/rulesets.css +30 -30
  176. package/tests-unit/rulesets/styles.config.ts +5 -0
  177. package/tests-unit/scope/legacy/scope.css +41 -0
  178. package/tests-unit/scope/scope.css +1 -1
  179. package/tests-unit/selectors/selectors.css +13 -41
  180. package/tests-unit/styles.config.cjs +1 -1
  181. package/tests-unit/styles.config.ts +8 -0
  182. package/tests-unit/variables/legacy/variable-advanced.css +58 -0
  183. package/tests-unit/variables/variable-advanced.css +9 -12
  184. package/tests-unit/variables/variable-advanced.less +5 -4
  185. package/tests-unit/variables/variables.css +1 -1
  186. package/tests-unit/variables-in-at-rules/variables-in-at-rules.less +3 -2
  187. package/tests-unit/whitespace/legacy/whitespace.css +45 -0
  188. package/tests-unit/whitespace/whitespace.css +3 -2
  189. package/tests-warnings/parentless-ampersand-nested.less +6 -0
  190. package/tests-warnings/parentless-ampersand-nested.txt +42 -0
  191. package/tests-warnings/parentless-ampersand.less +3 -0
  192. package/tests-warnings/parentless-ampersand.txt +21 -0
  193. package/tests-config/rootpath-escape-interpolation/rootpath-escape-interpolation.css +0 -8
  194. package/tests-config/rootpath-escape-interpolation/rootpath-escape-interpolation.less +0 -24
  195. package/tests-config/rootpath-escape-interpolation/styles.config.cjs +0 -8
  196. package/tests-config/sourcemaps/url-interpolation/styles.config.cjs +0 -9
  197. package/tests-config/sourcemaps/url-interpolation/url-interpolation.css +0 -13
  198. package/tests-config/sourcemaps/url-interpolation/url-interpolation.less +0 -24
  199. package/tests-error/parse/property-interpolation-lookup.less +0 -8
  200. package/tests-error/parse/property-interpolation-lookup.txt +0 -4
  201. package/tests-unit/extend/extend-clearfix.less +0 -19
  202. package/tests-unit/lookup-interpolation/lookup-interpolation.css +0 -60
  203. package/tests-unit/lookup-interpolation/lookup-interpolation.less +0 -127
  204. package/tests-unit/media-nested-type/media-nested-type.css +0 -40
  205. package/tests-unit/media-nested-type/media-nested-type.less +0 -51
  206. /package/tests-unit/{directives-bubbling/directives-bubbling.less → at-rules-bubbling/at-rules-bubbling.less} +0 -0
  207. /package/tests-unit/{ie-filters → ie-filters-REMOVED/legacy}/ie-filters.css +0 -0
  208. /package/tests-unit/{ie-filters → ie-filters-REMOVED/legacy}/ie-filters.less +0 -0
  209. /package/tests-unit/{javascript → javascript-REMOVED/legacy}/javascript.css +0 -0
  210. /package/tests-unit/{javascript → javascript-REMOVED/legacy}/javascript.less +0 -0
  211. /package/tests-unit/{javascript → javascript-REMOVED/legacy}/styles.config.cjs +0 -0
@@ -0,0 +1,244 @@
1
+ #built-in {
2
+ escaped: -Some::weird(#thing, y);
3
+ lighten: #ffcccc;
4
+ lighten-relative: #ff6666;
5
+ darken: #330000;
6
+ darken-relative: #990000;
7
+ saturate: #203c31;
8
+ saturate-relative: #28342f;
9
+ desaturate: #29332f;
10
+ desaturate-relative: #233930;
11
+ greyscale: #2e2e2e;
12
+ hsl-clamp: hsl(0, 0%, 100%);
13
+ spin-p: hsl(20, 50%, 50%);
14
+ spin-n: hsl(350, 50%, 50%);
15
+ luma-white: 100%;
16
+ luma-black: 0%;
17
+ luma-black-alpha: 0%;
18
+ luma-red: 21.26%;
19
+ luma-green: 71.52%;
20
+ luma-blue: 7.22%;
21
+ luma-yellow: 92.78%;
22
+ luma-cyan: 78.74%;
23
+ luma-differs-from-luminance: 23.89833349%;
24
+ luminance-white: 100%;
25
+ luminance-black: 0%;
26
+ luminance-black-alpha: 0%;
27
+ luminance-red: 21.26%;
28
+ luminance-differs-from-luma: 36.40541176%;
29
+ contrast-filter: contrast(30%);
30
+ saturate-filter: saturate(5%);
31
+ contrast-white: #000000;
32
+ contrast-black: #ffffff;
33
+ contrast-red: #ffffff;
34
+ contrast-green: #000000;
35
+ contrast-blue: #ffffff;
36
+ contrast-yellow: #000000;
37
+ contrast-cyan: #000000;
38
+ contrast-light: #111111;
39
+ contrast-dark: #eeeeee;
40
+ contrast-wrongorder: #111111;
41
+ contrast-light-thresh: #111111;
42
+ contrast-dark-thresh: #eeeeee;
43
+ contrast-high-thresh: #eeeeee;
44
+ contrast-low-thresh: #111111;
45
+ contrast-light-thresh-per: #111111;
46
+ contrast-dark-thresh-per: #eeeeee;
47
+ contrast-high-thresh-per: #eeeeee;
48
+ contrast-low-thresh-per: #111111;
49
+ replace: "Hello, World!";
50
+ replace-captured: "This is a new string.";
51
+ replace-with-flags: "2 + 2 = 4";
52
+ replace-single-quoted: 'foo-2';
53
+ replace-escaped-string: bar-2;
54
+ replace-keyword: baz-2;
55
+ replace-with-color: "#135#1357";
56
+ replace-with-number: "2em07";
57
+ format: "rgb(32, 128, 64)";
58
+ format-string: "hello world";
59
+ format-multiple: "hello earth 2";
60
+ format-url-encode: "red is %23ff0000";
61
+ format-single-quoted: 'hello single world';
62
+ format-escaped-string: hello escaped world;
63
+ format-color-as-string: "#123";
64
+ format-number-as-string: "4px";
65
+ eformat: rgb(32, 128, 64);
66
+ unitless: 12;
67
+ unit: 14em;
68
+ unitpercentage: 100%;
69
+ get-unit: px;
70
+ get-unit-empty: ;
71
+ hue: 98;
72
+ saturation: 12%;
73
+ lightness: 95%;
74
+ hsvhue: 98;
75
+ hsvsaturation: 12%;
76
+ hsvvalue: 95%;
77
+ red: 255;
78
+ green: 255;
79
+ blue: 255;
80
+ rounded: 11;
81
+ rounded-two: 10.67;
82
+ roundedpx: 3px;
83
+ roundedpx-three: 3.333px;
84
+ rounded-percentage: 10%;
85
+ ceil: 11px;
86
+ floor: 12px;
87
+ sqrt: 5px;
88
+ pi: 3.14159265;
89
+ mod: 2m;
90
+ abs: 4%;
91
+ tan: 0.90040404;
92
+ sin: 0.17364818;
93
+ cos: 0.84385396;
94
+ atan: 0.1rad;
95
+ atan: 34deg;
96
+ atan: 45deg;
97
+ pow: 64px;
98
+ pow: 64;
99
+ pow: 27;
100
+ min: 0;
101
+ min: 5;
102
+ min: 1pt;
103
+ min: 3mm;
104
+ min: min(1, 4ex, 2pt);
105
+ min: min(calc(1em + 1vw), 1);
106
+ min: min(var(--width), 802px);
107
+ max: 3;
108
+ max: 5em;
109
+ max: max(5m, 3em);
110
+ max: min(var(--body-max-width), calc(100vw - 20px));
111
+ max: max(1, calc(1em + 1vw));
112
+ max-native: max(10vw, 100px);
113
+ percentage: 20%;
114
+ color-quoted-digit: #dda0dd;
115
+ color-quoted-keyword: #dda0dd;
116
+ color-color: #dda0dd;
117
+ color-keyword: #dda0dd;
118
+ tint: #898989;
119
+ tint-full: #ffffff;
120
+ tint-percent: #898989;
121
+ tint-negative: #656565;
122
+ shade: #686868;
123
+ shade-full: #000000;
124
+ shade-percent: #686868;
125
+ shade-negative: #868686;
126
+ fade-out: rgba(255, 0, 0, 0.95);
127
+ fade-in: rgba(255, 0, 0, 0.95);
128
+ fade-out-relative: rgba(255, 0, 0, 0.95);
129
+ fade-in-relative: rgba(255, 0, 0, 0.945);
130
+ fade-out2: rgba(255, 0, 0, 0);
131
+ fade-out2-relative: rgba(255, 0, 0, 0.25);
132
+ hsv: hsl(5, 33.33333333%, 22.5%);
133
+ hsva: rgba(77, 40, 38, 0.2);
134
+ mix: #ff3300;
135
+ mix-0: #ffff00;
136
+ mix-100: #ff0000;
137
+ mix-weightless: #ff8000;
138
+ mixt: rgba(255, 0, 0, 0.5);
139
+ }
140
+ #built-in .is-a {
141
+ rules-defined: true;
142
+ foo-defined: false;
143
+ ruleset: true;
144
+ color: true;
145
+ color1: true;
146
+ color2: true;
147
+ color3: true;
148
+ keyword: true;
149
+ number: true;
150
+ string: true;
151
+ pixel: true;
152
+ percent: true;
153
+ em: true;
154
+ ex: true;
155
+ rem: true;
156
+ vw: true;
157
+ vh: true;
158
+ vmin: true;
159
+ vmax: true;
160
+ ch: true;
161
+ cm: true;
162
+ mm: true;
163
+ pt: true;
164
+ q: true;
165
+ in: true;
166
+ cat: true;
167
+ no-unit-is-empty: true;
168
+ case-insensitive-1: true;
169
+ case-insensitive-2: true;
170
+ }
171
+ #alpha {
172
+ alpha: hsla(25, 50%, 40%, 0.6);
173
+ alpha2: 0.5;
174
+ alpha3: 0;
175
+ }
176
+ #blendmodes {
177
+ multiply: #ed0000;
178
+ screen: #f600f6;
179
+ overlay: #ed0000;
180
+ softlight: #fa0000;
181
+ hardlight: #0000ed;
182
+ difference: #f600f6;
183
+ exclusion: #f600f6;
184
+ average: #7b007b;
185
+ negation: #d73131;
186
+ }
187
+ #extract-and-length {
188
+ extract: 3 2 1 C B A;
189
+ length: 6;
190
+ }
191
+ #quoted-functions-in-mixin {
192
+ replace-double-quoted: 'foo-2';
193
+ replace-single-quoted: 'foo-4';
194
+ replace-escaped-string: bar-2;
195
+ replace-keyword: baz-2;
196
+ replace-anonymous: qux-2;
197
+ format-double-quoted: "hello world";
198
+ format-single-quoted: 'hello single world';
199
+ format-escaped-string: hello escaped world;
200
+ format-keyword: hello;
201
+ format-anonymous: hello anonymous world;
202
+ }
203
+ #list-details {
204
+ length: 2;
205
+ one: a 1;
206
+ two: b 2;
207
+ two-length: 2;
208
+ two-one: b;
209
+ two-two: 2;
210
+ }
211
+ /* comment1 */
212
+ html {
213
+ color: #8080ff;
214
+ }
215
+ #boolean {
216
+ a: true;
217
+ b: false;
218
+ c: false;
219
+ }
220
+ #if {
221
+ a: 1;
222
+ b: 2;
223
+ c: 3;
224
+ e: ;
225
+ f: 6;
226
+ g: 3;
227
+ h: 5;
228
+ i: 6;
229
+ j: 8;
230
+ k: 1;
231
+ l: black;
232
+ /* results in void */
233
+ color: green;
234
+ color: purple;
235
+ }
236
+ .paren-escapes {
237
+ list-1: 1, 2, 3;
238
+ length-1: 3;
239
+ item-1: 4;
240
+ item-2: 5;
241
+ item-3: 6;
242
+ list-2: 1, 2, 3;
243
+ list-3: 7, 8, 9;
244
+ }
@@ -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;
@@ -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;
@@ -44,11 +44,13 @@ div#id.class[a=one][b=two].class:not(.one) {
44
44
  }
45
45
  .b {
46
46
  color: red;
47
- color: green;
48
47
  }
49
48
  .b .c {
50
49
  color: green;
51
50
  }
51
+ .b {
52
+ color: green;
53
+ }
52
54
  .b:hover {
53
55
  color: green;
54
56
  }
@@ -59,7 +61,7 @@ div#id.class[a=one][b=two].class:not(.one) {
59
61
  color: green;
60
62
  }
61
63
  .y {
62
- pulled-in: yes /* inline comment survives */;
64
+ pulled-in: yes;
63
65
  }
64
66
  /* comment pulled in */
65
67
  .visible {
@@ -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
+ }