@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
@@ -1,3 +1,4 @@
1
+ // Less v5 can further simplify a number of these calc expressions
1
2
  @val: 10px;
2
3
  @var: 50vh/2;
3
4
 
@@ -0,0 +1,32 @@
1
+ /* Less 4.x output, recorded when this fixture graduated to v5.
2
+ Historical record only — no test reads this file. */
3
+
4
+ .calc-basic {
5
+ width: calc(100% - 30px);
6
+ height: calc(50% + 20px);
7
+ margin: 20px;
8
+ padding: calc(100vh - 50px);
9
+ }
10
+ .calc-variables {
11
+ root: calc(100% - 30px);
12
+ root2: calc(100% - 40px);
13
+ width: calc(50% + (25vh - 20px));
14
+ height: calc(50% + (25vh - 20px));
15
+ }
16
+ .calc-nested {
17
+ min-height: calc(10vh + calc(5vh));
18
+ nested: calc(calc(2.25rem + 2px) - 1px * 2);
19
+ }
20
+ .calc-functions {
21
+ one: calc(100% - 20px);
22
+ two: calc(100% - (10px + 10px));
23
+ bar: calc(1 + 20%);
24
+ }
25
+ .calc-escape {
26
+ three: calc(100% - (3 * 1));
27
+ four: calc(100% - (3 * 1));
28
+ }
29
+ .calc-mixed {
30
+ foo: 3 calc(3 + 4) 11;
31
+ height: calc(100% - ((10px * 3) + (10px * 2)));
32
+ }
@@ -14,5 +14,5 @@
14
14
  }
15
15
  #percentage {
16
16
  color: 255;
17
- border-color: rgba(255, 0, 0, 0.5);
17
+ border-color: rgba(100%, 0, 0, 50%);
18
18
  }
@@ -29,17 +29,17 @@
29
29
  }
30
30
  #percentage {
31
31
  color: 255;
32
- border-color: rgba(255, 0, 0, 0.5);
32
+ border-color: rgba(100%, 0, 0, 50%);
33
33
  }
34
34
  #grey {
35
- color: #c8c8c8;
35
+ color: rgb(200, 200, 200);
36
36
  }
37
37
  #aa3333 {
38
- color: #aa3333;
38
+ color: rgb(66.66%, 20%, 20%);
39
39
  }
40
40
  #bb8080 {
41
- color: hsl(0, 30%, 62%);
41
+ color: hsl(0deg, 30%, 62%);
42
42
  }
43
43
  #ccff00 {
44
- color: hsl(72, 100%, 50%);
44
+ color: hsl(72deg, 100%, 50%);
45
45
  }
@@ -1,4 +1,5 @@
1
1
  // Comprehensive color function tests - all color functions without problematic nesting
2
+ // Less v5 preserves original color expressions when possible
2
3
  .lightenblue {
3
4
  color: lighten(blue, 10%);
4
5
  }
@@ -25,15 +25,3 @@
25
25
  #alpha #hsla {
26
26
  color: hsla(11, 20%, 20%, 0.6);
27
27
  }
28
- #grey {
29
- color: #c8c8c8;
30
- }
31
- #aa3333 {
32
- color: #aa3333;
33
- }
34
- #bb8080 {
35
- color: hsl(0, 30%, 62%);
36
- }
37
- #ccff00 {
38
- color: hsl(72, 100%, 50%);
39
- }
@@ -29,18 +29,3 @@
29
29
  color: hsla(11, 20%, 20%, 0.6);
30
30
  }
31
31
 
32
- #grey {
33
- color: rgb(200, 200, 200);
34
- }
35
-
36
- #aa3333 {
37
- color: rgb(66.66%, 20%, 20%);
38
- }
39
-
40
- #bb8080 {
41
- color: hsl(0deg, 30%, 62%);
42
- }
43
-
44
- #ccff00 {
45
- color: hsl(72deg, 100%, 50%);
46
- }
@@ -0,0 +1,21 @@
1
+ /* Less 4.x output, recorded when this fixture graduated to v5.
2
+ Historical record only — no test reads this file. */
3
+
4
+ .lightenblue {
5
+ color: #3333ff;
6
+ }
7
+ .darkenblue {
8
+ color: #0000cc;
9
+ }
10
+ .unknowncolors {
11
+ color: blue2;
12
+ border: 2px solid superred;
13
+ }
14
+ .transparent {
15
+ color: transparent;
16
+ background-color: rgba(0, 0, 0, 0);
17
+ }
18
+ #percentage {
19
+ color: 255;
20
+ border-color: rgba(255, 0, 0, 0.5);
21
+ }
@@ -0,0 +1,48 @@
1
+ /* Less 4.x output, recorded when this fixture graduated to v5.
2
+ Historical record only — no test reads this file. */
3
+
4
+ .lightenblue {
5
+ color: #3333ff;
6
+ }
7
+ .darkenblue {
8
+ color: #0000cc;
9
+ }
10
+ .unknowncolors {
11
+ color: blue2;
12
+ border: 2px solid superred;
13
+ }
14
+ .transparent {
15
+ color: transparent;
16
+ background-color: rgba(0, 0, 0, 0);
17
+ }
18
+ #alpha #fromvar {
19
+ opacity: 0.7;
20
+ }
21
+ #alpha #short {
22
+ opacity: 1;
23
+ }
24
+ #alpha #long {
25
+ opacity: 1;
26
+ }
27
+ #alpha #rgba {
28
+ opacity: 0.2;
29
+ }
30
+ #alpha #hsl {
31
+ opacity: 1;
32
+ }
33
+ #percentage {
34
+ color: 255;
35
+ border-color: rgba(255, 0, 0, 0.5);
36
+ }
37
+ #grey {
38
+ color: #c8c8c8;
39
+ }
40
+ #aa3333 {
41
+ color: #aa3333;
42
+ }
43
+ #bb8080 {
44
+ color: hsl(0, 30%, 62%);
45
+ }
46
+ #ccff00 {
47
+ color: hsl(72, 100%, 50%);
48
+ }
@@ -0,0 +1,9 @@
1
+ /* Less 4.x output, recorded when this fixture graduated to v5.
2
+ Historical record only — no test reads this file. */
3
+
4
+ foo {
5
+ color: #0080ff;
6
+ color: rgba(0, 128, 255, 0.5);
7
+ color: hsl(198, 28%, 50%);
8
+ color: hsla(198, 28%, 50%, 0.5);
9
+ }
@@ -0,0 +1,18 @@
1
+ /* Less 4.x output, recorded when this fixture graduated to v5.
2
+ Historical record only — no test reads this file. */
3
+
4
+ #overflow .a {
5
+ color: #000000;
6
+ }
7
+ #overflow .b {
8
+ color: #ffffff;
9
+ }
10
+ #overflow .c {
11
+ color: #ffffff;
12
+ }
13
+ #overflow .d {
14
+ color: #00ff00;
15
+ }
16
+ #overflow .e {
17
+ color: rgba(0, 31, 255, 0.42);
18
+ }
@@ -0,0 +1,20 @@
1
+ /* Less 4.x output, recorded when this fixture graduated to v5.
2
+ Historical record only — no test reads this file. */
3
+
4
+ #rrggbbaa {
5
+ test-1: #55FF5599;
6
+ test-2: #5F59;
7
+ test-3: rgba(136, 255, 136, 0.6);
8
+ test-4: rgba(85, 255, 85, 0.1);
9
+ test-5: rgba(85, 255, 85, 0.6);
10
+ test-6: rgba(85, 255, 85, 0.6);
11
+ test-7: rgba(85, 255, 85, 0.5);
12
+ test-8: rgba(var(--color-accent), 0.2);
13
+ test-9: rgb(var(--color-accent));
14
+ test-9: hsla(var(--color-accent));
15
+ test-10: #55FF5599;
16
+ test-11: hsla(120, 100%, 66.66666667%, 0.6);
17
+ test-12: hsla(120, 100%, 66.66666667%, 0.5);
18
+ --semi-transparent-dark-background: #001e00ee;
19
+ --semi-transparent-dark-background-2: #001e00;
20
+ }
@@ -1,6 +1,6 @@
1
1
  foo {
2
- color: #0080ff;
3
- color: rgba(0, 128, 255, 0.5);
4
- color: hsl(198, 28%, 50%);
5
- color: hsla(198, 28%, 50%, 0.5);
2
+ color: rgb(0 128 255);
3
+ color: rgb(0 128 255 / 50%);
4
+ color: hsl(198deg 28% 50%);
5
+ color: hsl(198deg 28% 50% / 50%);
6
6
  }
@@ -1,4 +1,5 @@
1
1
  // Modern CSS color syntax tests - space-separated values and / alpha syntax
2
+ // Less v5 preserves modern syntax when possible.
2
3
  foo {
3
4
  color: rgb(0 128 255);
4
5
  color: rgb(0 128 255 / 50%);
@@ -11,5 +11,5 @@
11
11
  color: #00ff00;
12
12
  }
13
13
  #overflow .e {
14
- color: rgba(0, 31, 255, 0.42);
14
+ color: rgba(-99.9, 31.4159, 321, 0.42);
15
15
  }
@@ -4,5 +4,6 @@
4
4
  .b { color: (#eee + #fff); } // #ffffff
5
5
  .c { color: (#aaa * 3); } // #ffffff
6
6
  .d { color: (#00ee00 + #009900); } // #00ff00
7
+ // Less v5 preserves color statements that overflow.
7
8
  .e { color: rgba(-99.9, 31.4159, 321, 0.42); }
8
9
  }
@@ -1,8 +1,8 @@
1
1
  #rrggbbaa {
2
2
  test-1: #55FF5599;
3
3
  test-2: #5F59;
4
- test-3: rgba(136, 255, 136, 0.6);
5
- test-4: rgba(85, 255, 85, 0.1);
4
+ test-3: #88ff8899;
5
+ test-4: #55ff551a;
6
6
  test-5: rgba(85, 255, 85, 0.6);
7
7
  test-6: rgba(85, 255, 85, 0.6);
8
8
  test-7: rgba(85, 255, 85, 0.5);
@@ -13,5 +13,5 @@
13
13
  test-11: hsla(120, 100%, 66.66666667%, 0.6);
14
14
  test-12: hsla(120, 100%, 66.66666667%, 0.5);
15
15
  --semi-transparent-dark-background: #001e00ee;
16
- --semi-transparent-dark-background-2: #001e00;
16
+ --semi-transparent-dark-background-2: rgba(0, 30, 0, 238);
17
17
  }
@@ -2,6 +2,7 @@
2
2
  #rrggbbaa {
3
3
  test-1: #55FF5599;
4
4
  test-2: #5F59;
5
+ // Less v5 will attempt to preserve color formats when possible.
5
6
  test-3: lighten(#55FF5599, 10%);
6
7
  test-4: fade(#5F59, 10%);
7
8
  test-5: rgba(#55FF5599);
@@ -14,5 +15,6 @@
14
15
  test-11: hsla(#5F59);
15
16
  test-12: hsla(#5F59, 0.5);
16
17
  --semi-transparent-dark-background: #001e00ee;
17
- --semi-transparent-dark-background-2: rgba(0, 30, 0, 238); // invalid opacity will be capped
18
+ // Less v5 will not alter custom properties - they can represent any unknown value.
19
+ --semi-transparent-dark-background-2: rgba(0, 30, 0, 238);
18
20
  }
@@ -26,7 +26,7 @@
26
26
  */
27
27
  /* @group Variables
28
28
  ------------------- */
29
- #comments,
29
+ #comments /* boo *//* boo again*/,
30
30
  .comments {
31
31
  /**/
32
32
  color: red;
@@ -45,10 +45,10 @@
45
45
  color: grey;
46
46
  }
47
47
  */
48
- .selector,
48
+ .selector /* .with */,
49
49
  .lots,
50
- .comments {
51
- color: grey, /* blue */ orange;
50
+ /* of */ .comments {
51
+ color/* survive */ /* me too */: grey, /* blue */ orange;
52
52
  -webkit-border-radius: 2px /* webkit only */;
53
53
  -moz-border-radius: 8px /* moz only with operation */;
54
54
  }
@@ -58,8 +58,7 @@
58
58
  .sr-only-focusable {
59
59
  clip: auto;
60
60
  }
61
- @-webkit-keyframes hover {
62
- /* and Chrome */
61
+ @-webkit-keyframes /* Safari */ hover /* and Chrome */ {
63
62
  0% {
64
63
  color: red;
65
64
  }
@@ -1,4 +1,5 @@
1
1
  // Comprehensive comment handling tests
2
+ // Less v5 will preserve many more comments as-is
2
3
  /******************\
3
4
  * *
4
5
  * Comment Header *
@@ -99,5 +100,5 @@
99
100
  // line immediately followed
100
101
  /*by block */
101
102
  @string_w_comment: ~"/* // Not commented out // */";
102
- #output-block { --comment: @string_w_comment; }
103
+ #output-block { --comment: @{string_w_comment}; }
103
104
  /*comment on last line*/
@@ -1,18 +1,16 @@
1
- @-webkit-keyframes hover {
2
- /* Safari and Chrome */
3
- }
4
1
  .bg {
5
2
  background-image: linear-gradient(#333 /*{comment}*/, #111);
6
3
  }
7
4
  #planadvisor,
5
+ /*comment*//*comment*/
8
6
  .first,
9
- .planning {
7
+ /*comment*//*comment*/.planning {
10
8
  margin: 10px;
11
9
  total-width: 96em;
12
10
  }
13
11
  .some-inline-comments {
14
12
  a: yes /* comment */;
15
13
  b: red /* comment */;
16
- c: yes /* comment */;
17
- d: red /* comment */;
14
+ c: yes;
15
+ d: red;
18
16
  }
@@ -1,5 +1,6 @@
1
1
  // Inline comments and grid system tests
2
2
  @media all and/*! */(max-width:1024px) {}
3
+ // In Less v5, This is an empty ruleset, so it is removed.
3
4
  @-webkit-keyframes hover /* Safari and Chrome */{ }
4
5
  .bg {
5
6
  background-image: linear-gradient(#333 /*{comment}*/, #111);
@@ -25,6 +26,8 @@
25
26
  .some-inline-comments {
26
27
  a: yes /* comment */;
27
28
  b: red /* comment */;
29
+ // In Less v5, the comment is considered to be attached to the source,
30
+ // not part of the value.
28
31
  @c: yes /* comment */;
29
32
  @d: red /* comment */;
30
33
  c: @c;
@@ -0,0 +1,86 @@
1
+ /* Less 4.x output, recorded when this fixture graduated to v5.
2
+ Historical record only — no test reads this file. */
3
+
4
+ /******************\
5
+ * *
6
+ * Comment Header *
7
+ * *
8
+ \******************/
9
+ /*
10
+
11
+ Comment
12
+
13
+ */
14
+ /*
15
+ * Comment Test
16
+ *
17
+ * - cloudhead (http://cloudhead.net)
18
+ *
19
+ */
20
+ /* Colors
21
+ * ------
22
+ * #EDF8FC (background blue)
23
+ * #166C89 (darkest blue)
24
+ *
25
+ * Text:
26
+ * #333 (standard text) // A comment within a comment!
27
+ * #1F9EC9 (standard link)
28
+ *
29
+ */
30
+ /* @group Variables
31
+ ------------------- */
32
+ #comments,
33
+ .comments {
34
+ /**/
35
+ color: red;
36
+ /* A C-style comment */
37
+ /* A C-style comment */
38
+ background-color: orange;
39
+ font-size: 12px;
40
+ /* lost comment */
41
+ content: "content";
42
+ border: 1px solid black;
43
+ padding: 0;
44
+ margin: 2em;
45
+ }
46
+ /* commented out
47
+ #more-comments {
48
+ color: grey;
49
+ }
50
+ */
51
+ .selector,
52
+ .lots,
53
+ .comments {
54
+ color: grey, /* blue */ orange;
55
+ -webkit-border-radius: 2px /* webkit only */;
56
+ -moz-border-radius: 8px /* moz only with operation */;
57
+ }
58
+ .test-rule {
59
+ color: 1px;
60
+ }
61
+ .sr-only-focusable {
62
+ clip: auto;
63
+ }
64
+ @-webkit-keyframes hover {
65
+ /* and Chrome */
66
+ 0% {
67
+ color: red;
68
+ }
69
+ }
70
+ #last {
71
+ color: blue;
72
+ }
73
+ /* */
74
+ /* { */
75
+ /* */
76
+ /* */
77
+ /* */
78
+ #div {
79
+ color: #A33;
80
+ }
81
+ /* } */
82
+ /*by block */
83
+ #output-block {
84
+ --comment: /* // Not commented out // */;
85
+ }
86
+ /*comment on last line*/
@@ -0,0 +1,21 @@
1
+ /* Less 4.x output, recorded when this fixture graduated to v5.
2
+ Historical record only — no test reads this file. */
3
+
4
+ @-webkit-keyframes hover {
5
+ /* Safari and Chrome */
6
+ }
7
+ .bg {
8
+ background-image: linear-gradient(#333 /*{comment}*/, #111);
9
+ }
10
+ #planadvisor,
11
+ .first,
12
+ .planning {
13
+ margin: 10px;
14
+ total-width: 96em;
15
+ }
16
+ .some-inline-comments {
17
+ a: yes /* comment */;
18
+ b: red /* comment */;
19
+ c: yes /* comment */;
20
+ d: red /* comment */;
21
+ }