@less/test-data 4.8.1 → 5.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) 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/namespacing/legacy/namespacing-7.css +15 -0
  13. package/tests-config/namespacing/namespacing-5.less +3 -3
  14. package/tests-config/namespacing/namespacing-7.css +16 -8
  15. package/tests-config/namespacing/styles.config.cjs +4 -1
  16. package/tests-config/strict-imports/legacy/strict-imports.css +14 -0
  17. package/tests-config/strict-imports/strict-imports.css +4 -2
  18. package/tests-config/strict-imports/styles.config.cjs +6 -5
  19. package/tests-error/eval/ampersand-merge-template-invalid.less +7 -0
  20. package/tests-error/eval/ampersand-merge-template-invalid.txt +1 -0
  21. package/tests-error/eval/at-rules-undefined-var.less +1 -1
  22. package/tests-unit/at-rule-variable-interpolation/at-rule-variable-interpolation.css +45 -0
  23. package/tests-unit/at-rule-variable-interpolation/at-rule-variable-interpolation.less +72 -0
  24. package/tests-unit/at-rules/at-rules.css +8 -6
  25. package/tests-unit/at-rules/legacy/at-rules.css +110 -0
  26. package/tests-unit/at-rules/styles.config.ts +5 -0
  27. package/tests-unit/at-rules-bubbling/at-rules-bubbling.css +121 -0
  28. package/tests-unit/at-rules-bubbling/legacy/at-rules-bubbling.css +122 -0
  29. package/tests-unit/at-rules-keyword-comments/at-rules-keyword-comments.css +2 -5
  30. package/tests-unit/at-rules-keyword-comments/legacy/at-rules-keyword-comments.css +12 -0
  31. package/tests-unit/at-rules-targeted/at-rules-targeted.css +5 -3
  32. package/tests-unit/at-rules-targeted/legacy/at-rules-targeted.css +55 -0
  33. package/tests-unit/calc/calc.css +8 -8
  34. package/tests-unit/calc/calc.less +1 -0
  35. package/tests-unit/calc/legacy/calc.css +32 -0
  36. package/tests-unit/color-functions/basic.css +1 -1
  37. package/tests-unit/color-functions/comprehensive.css +5 -5
  38. package/tests-unit/color-functions/comprehensive.less +1 -0
  39. package/tests-unit/color-functions/formats.css +0 -12
  40. package/tests-unit/color-functions/formats.less +0 -15
  41. package/tests-unit/color-functions/legacy/basic.css +21 -0
  42. package/tests-unit/color-functions/legacy/comprehensive.css +48 -0
  43. package/tests-unit/color-functions/legacy/modern-syntax.css +9 -0
  44. package/tests-unit/color-functions/legacy/operations.css +18 -0
  45. package/tests-unit/color-functions/legacy/rgba.css +20 -0
  46. package/tests-unit/color-functions/modern-syntax.css +4 -4
  47. package/tests-unit/color-functions/modern-syntax.less +1 -0
  48. package/tests-unit/color-functions/operations.less +1 -0
  49. package/tests-unit/color-functions/rgba.css +3 -3
  50. package/tests-unit/color-functions/rgba.less +3 -1
  51. package/tests-unit/comments/comments.css +5 -6
  52. package/tests-unit/comments/comments.less +2 -1
  53. package/tests-unit/comments/comments2.css +4 -6
  54. package/tests-unit/comments/comments2.less +3 -0
  55. package/tests-unit/comments/legacy/comments.css +86 -0
  56. package/tests-unit/comments/legacy/comments2.css +21 -0
  57. package/tests-unit/container/container.css +40 -83
  58. package/tests-unit/container/container.less +28 -82
  59. package/tests-unit/container/legacy/container.css +273 -0
  60. package/tests-unit/container/styles.config.ts +8 -0
  61. package/tests-unit/css-3/css-3.css +4 -4
  62. package/tests-unit/css-3/legacy/css-3.css +147 -0
  63. package/tests-unit/css-escapes/css-escapes.css +4 -4
  64. package/tests-unit/css-escapes/legacy/css-escapes.css +34 -0
  65. package/tests-unit/css-escapes/styles.config.ts +5 -0
  66. package/tests-unit/css-grid/css-grid.css +4 -1
  67. package/tests-unit/css-grid/legacy/css-grid.css +27 -0
  68. package/tests-unit/css-guards/css-guards.less +2 -1
  69. package/tests-unit/detached-rulesets/detached-rulesets.css +26 -18
  70. package/tests-unit/detached-rulesets/legacy/detached-rulesets.css +79 -0
  71. package/tests-unit/directives-bubbling/directives-bubbling.css +16 -14
  72. package/tests-unit/extend/extend.css +22 -28
  73. package/tests-unit/extend/legacy/extend.css +79 -0
  74. package/tests-unit/extend/styles.config.ts +5 -0
  75. package/tests-unit/extend-chaining/extend-chaining.css +7 -10
  76. package/tests-unit/extend-chaining/legacy/extend-chaining.css +84 -0
  77. package/tests-unit/extend-clearfix/extend-clearfix.css +1 -3
  78. package/tests-unit/extend-clearfix/extend-clearfix.less +0 -1
  79. package/tests-unit/{extend → extend-clearfix/legacy}/extend-clearfix.css +3 -0
  80. package/tests-unit/extend-exact/extend-exact.css +25 -24
  81. package/tests-unit/extend-exact/legacy/extend-exact.css +40 -0
  82. package/tests-unit/extend-exact/styles.config.ts +5 -0
  83. package/tests-unit/extend-media/extend-media.css +9 -14
  84. package/tests-unit/extend-media/legacy/extend-media.css +27 -0
  85. package/tests-unit/extend-media/styles.config.ts +5 -0
  86. package/tests-unit/extend-nest/extend-nest.css +3 -22
  87. package/tests-unit/extend-nest/legacy/extend-nest.css +60 -0
  88. package/tests-unit/extend-selector/extend-selector.css +42 -67
  89. package/tests-unit/extend-selector/extend-selector.less +0 -15
  90. package/tests-unit/extend-selector/legacy/extend-selector.css +73 -0
  91. package/tests-unit/extend-selector/styles.config.ts +5 -0
  92. package/tests-unit/extract-and-length/extract-and-length.css +6 -5
  93. package/tests-unit/extract-and-length/extract-and-length.less +7 -2
  94. package/tests-unit/extract-and-length/legacy/extract-and-length.css +137 -0
  95. package/tests-unit/functions/functions.css +5 -14
  96. package/tests-unit/functions/functions.less +7 -17
  97. package/tests-unit/functions/legacy/functions.css +244 -0
  98. package/tests-unit/functions/legacy/functions.less +296 -0
  99. package/tests-unit/functions-each/functions-each.css +4 -2
  100. package/tests-unit/import/import-reference-issues.css +6 -6
  101. package/tests-unit/import/import-reference.css +4 -2
  102. package/tests-unit/import/legacy/import-reference-issues.css +27 -0
  103. package/tests-unit/import/legacy/import-reference.css +101 -0
  104. package/tests-unit/import/styles.config.cjs +5 -4
  105. package/tests-unit/layer/layer.css +30 -28
  106. package/tests-unit/layer/legacy/layer.css +136 -0
  107. package/tests-unit/layer/styles.config.ts +5 -0
  108. package/tests-unit/math-css-vars/math-css-vars.css +1 -0
  109. package/tests-unit/math-css-vars/math-css-vars.less +1 -0
  110. package/tests-unit/media/legacy/media.css +274 -0
  111. package/tests-unit/media/media.css +49 -43
  112. package/tests-unit/media/media.less +0 -2
  113. package/tests-unit/media/styles.config.cjs +5 -0
  114. package/tests-unit/merge/merge.css +2 -2
  115. package/tests-unit/mixin-noparens/legacy/mixin-noparens.css +10 -0
  116. package/tests-unit/mixin-noparens/mixin-noparens.css +4 -2
  117. package/tests-unit/mixin-noparens/styles.config.ts +5 -0
  118. package/tests-unit/mixins/legacy/maps.css +9 -0
  119. package/tests-unit/mixins/legacy/mixins.css +147 -0
  120. package/tests-unit/mixins/maps.css +7 -5
  121. package/tests-unit/mixins/mixins.css +7 -5
  122. package/tests-unit/mixins/styles.config.ts +5 -0
  123. package/tests-unit/mixins-closure/legacy/mixins-closure.css +12 -0
  124. package/tests-unit/mixins-closure/mixins-closure.css +4 -2
  125. package/tests-unit/mixins-closure/styles.config.ts +5 -0
  126. package/tests-unit/mixins-guards/legacy/mixins-guards.css +214 -0
  127. package/tests-unit/mixins-guards/mixins-guards.css +5 -3
  128. package/tests-unit/mixins-guards/mixins-guards.less +0 -1
  129. package/tests-unit/mixins-guards/styles.config.ts +5 -0
  130. package/tests-unit/mixins-guards-default-func/legacy/mixins-guards-default-func.css +132 -0
  131. package/tests-unit/mixins-guards-default-func/mixins-guards-default-func.css +0 -2
  132. package/tests-unit/mixins-important/mixins-important.css +33 -19
  133. package/tests-unit/mixins-interpolated/legacy/mixins-interpolated.css +42 -0
  134. package/tests-unit/mixins-interpolated/mixins-interpolated.css +24 -14
  135. package/tests-unit/mixins-interpolated/styles.config.ts +5 -0
  136. package/tests-unit/mixins-nested/legacy/mixins-nested.css +17 -0
  137. package/tests-unit/mixins-nested/mixins-nested.css +16 -12
  138. package/tests-unit/mixins-nested/styles.config.ts +5 -0
  139. package/tests-unit/nesting/legacy/nesting.css +27 -0
  140. package/tests-unit/nesting/nesting-uncollapsed.css +26 -0
  141. package/tests-unit/nesting/nesting.css +1 -1
  142. package/tests-unit/nesting/styles.config.ts +6 -0
  143. package/tests-unit/operations/operations.css +4 -2
  144. package/tests-unit/parse-interpolation/legacy/parse-interpolation.css +39 -0
  145. package/tests-unit/parse-interpolation/parse-interpolation.css +72 -35
  146. package/tests-unit/parse-interpolation/parse-interpolation.less +73 -25
  147. package/tests-unit/parse-interpolation/styles.config.ts +5 -0
  148. package/tests-unit/parser-property-interp/parser-property-interp.css +1 -1
  149. package/tests-unit/parser-property-interp/parser-property-interp.less +2 -2
  150. package/tests-unit/parser-slashed-combinator/parser-slashed-combinator.css +1 -9
  151. package/tests-unit/parser-slashed-combinator/parser-slashed-combinator.less +11 -11
  152. package/tests-unit/plugin/styles.config.ts +11 -0
  153. package/tests-unit/property-accessors/legacy/property-accessors.css +60 -0
  154. package/tests-unit/property-accessors/property-accessors.css +15 -7
  155. package/tests-unit/property-name-interp/legacy/property-name-interp.css +24 -0
  156. package/tests-unit/property-name-interp/property-name-interp.css +1 -1
  157. package/tests-unit/property-name-interp/property-name-interp.less +4 -2
  158. package/tests-unit/property-targeted/legacy/property-targeted.css +7 -0
  159. package/tests-unit/property-targeted/property-targeted.css +1 -1
  160. package/tests-unit/rulesets/legacy/rulesets.css +31 -0
  161. package/tests-unit/rulesets/rulesets.css +30 -30
  162. package/tests-unit/rulesets/styles.config.ts +5 -0
  163. package/tests-unit/scope/legacy/scope.css +41 -0
  164. package/tests-unit/scope/scope.css +1 -1
  165. package/tests-unit/selectors/selectors.css +13 -41
  166. package/tests-unit/styles.config.cjs +1 -1
  167. package/tests-unit/styles.config.ts +8 -0
  168. package/tests-unit/variables/legacy/variable-advanced.css +58 -0
  169. package/tests-unit/variables/variable-advanced.css +1 -4
  170. package/tests-unit/variables/variable-advanced.less +5 -4
  171. package/tests-unit/variables-in-at-rules/variables-in-at-rules.less +3 -2
  172. package/tests-unit/whitespace/legacy/whitespace.css +45 -0
  173. package/tests-unit/whitespace/whitespace.css +3 -2
  174. package/tests-warnings/parentless-ampersand-nested.less +6 -0
  175. package/tests-warnings/parentless-ampersand-nested.txt +42 -0
  176. package/tests-warnings/parentless-ampersand.less +3 -0
  177. package/tests-warnings/parentless-ampersand.txt +21 -0
  178. package/tests-unit/extend/extend-clearfix.less +0 -19
  179. /package/tests-unit/{directives-bubbling/directives-bubbling.less → at-rules-bubbling/at-rules-bubbling.less} +0 -0
  180. /package/tests-unit/{ie-filters → ie-filters-REMOVED/legacy}/ie-filters.css +0 -0
  181. /package/tests-unit/{ie-filters → ie-filters-REMOVED/legacy}/ie-filters.less +0 -0
  182. /package/tests-unit/{javascript → javascript-REMOVED/legacy}/javascript.css +0 -0
  183. /package/tests-unit/{javascript → javascript-REMOVED/legacy}/javascript.less +0 -0
  184. /package/tests-unit/{javascript → javascript-REMOVED/legacy}/styles.config.cjs +0 -0
@@ -0,0 +1,122 @@
1
+ /* Less 4.x output, recorded when this fixture graduated to v5.
2
+ Historical record only — no test reads this file. */
3
+
4
+ .parent {
5
+ color: green;
6
+ }
7
+ @document url-prefix() {
8
+ .parent .child {
9
+ color: red;
10
+ }
11
+ }
12
+ @supports (sandwitch: butter) {
13
+ .inside .top {
14
+ property: value;
15
+ }
16
+ }
17
+ @supports (sandwitch: bread) {
18
+ .in1 .in2 {
19
+ property: value;
20
+ }
21
+ }
22
+ @supports (sandwitch: ham) {
23
+ .inside .top {
24
+ property: value;
25
+ }
26
+ }
27
+ @supports (font-family: weirdFont) {
28
+ @font-face {
29
+ font-family: something;
30
+ src: made-up-url;
31
+ }
32
+ }
33
+ @font-face {
34
+ @supports not (-webkit-font-smoothing: subpixel-antialiased) {
35
+ font-family: something;
36
+ src: made-up-url;
37
+ }
38
+ }
39
+ @supports (property: value) {
40
+ @media (max-size: 2px) {
41
+ @supports (whatever: something) {
42
+ .outOfMedia {
43
+ property: value;
44
+ }
45
+ }
46
+ }
47
+ }
48
+ @supports (property: value) {
49
+ @media (max-size: 2px) {
50
+ @supports (whatever: something) {
51
+ .onTop {
52
+ property: value;
53
+ }
54
+ }
55
+ }
56
+ }
57
+ @media print {
58
+ html {
59
+ in-html: visible;
60
+ }
61
+ @supports (upper: test) {
62
+ html {
63
+ in-supports: first;
64
+ }
65
+ html div {
66
+ in-div: visible;
67
+ }
68
+ @supports not (-webkit-font-smoothing: subpixel-antialiased) {
69
+ html div {
70
+ in-supports: second;
71
+ }
72
+ @media screen {
73
+ html div {
74
+ font-weight: 400;
75
+ }
76
+ html div nested {
77
+ property: value;
78
+ }
79
+ }
80
+ }
81
+ }
82
+ }
83
+ @media print and (max-size: 2px) {
84
+ .in1 {
85
+ stay: here;
86
+ }
87
+ @supports not (-webkit-font-smoothing: subpixel-antialiased) {
88
+ @supports (whatever: something) {
89
+ .in2 .in1 {
90
+ property: value;
91
+ }
92
+ }
93
+ }
94
+ }
95
+ html {
96
+ font-weight: 300;
97
+ -webkit-font-smoothing: subpixel-antialiased;
98
+ }
99
+ @supports not (-webkit-font-smoothing: subpixel-antialiased) {
100
+ html {
101
+ font-weight: 400;
102
+ }
103
+ html nested {
104
+ property: value;
105
+ }
106
+ }
107
+ .onTop {
108
+ animation: "textscale";
109
+ font-family: something;
110
+ }
111
+ @font-face {
112
+ font-family: something;
113
+ src: made-up-url;
114
+ }
115
+ @keyframes "textscale" {
116
+ 0% {
117
+ font-size: 1em;
118
+ }
119
+ 100% {
120
+ font-size: 2em;
121
+ }
122
+ }
@@ -1,9 +1,6 @@
1
- @import "test.css" screen, print;
2
- @media screen, print, handheld {
3
- /* comment */
4
- /* another */
1
+ @import "test.css" screen /* comment */, print;
2
+ @media screen /* comment */, print /* another */, handheld {
5
3
  body {
6
4
  font-size: 12pt;
7
5
  }
8
6
  }
9
- /* comment */
@@ -0,0 +1,12 @@
1
+ /* Less 4.x output, recorded when this fixture graduated to v5.
2
+ Historical record only — no test reads this file. */
3
+
4
+ @import "test.css" screen, print;
5
+ @media screen, print, handheld {
6
+ /* comment */
7
+ /* another */
8
+ body {
9
+ font-size: 12pt;
10
+ }
11
+ }
12
+ /* comment */
@@ -19,9 +19,11 @@
19
19
  margin: 2cm;
20
20
  size: A4;
21
21
  }
22
- @media screen and (max-width: 768px) {
23
- .nested {
24
- display: block;
22
+ @media screen {
23
+ @media (max-width: 768px) {
24
+ .nested {
25
+ display: block;
26
+ }
25
27
  }
26
28
  }
27
29
  @media screen {
@@ -0,0 +1,55 @@
1
+ /* Less 4.x output, recorded when this fixture graduated to v5.
2
+ Historical record only — no test reads this file. */
3
+
4
+ @charset "UTF-8";
5
+ @media screen {
6
+ .test {
7
+ color: red;
8
+ }
9
+ }
10
+ @media screen, print, handheld {
11
+ body {
12
+ font-size: 12pt;
13
+ }
14
+ }
15
+ @supports (display: grid) {
16
+ .grid {
17
+ display: grid;
18
+ grid-template-columns: 1fr 1fr;
19
+ }
20
+ }
21
+ @page {
22
+ margin: 2cm;
23
+ size: A4;
24
+ }
25
+ @media screen and (max-width: 768px) {
26
+ .nested {
27
+ display: block;
28
+ }
29
+ }
30
+ @media screen {
31
+ .container {
32
+ color: red;
33
+ }
34
+ .container .child {
35
+ color: blue;
36
+ }
37
+ }
38
+ @media screen {
39
+ .test-var-access {
40
+ color: value;
41
+ }
42
+ }
43
+ @layer base {
44
+ body {
45
+ margin: 0;
46
+ }
47
+ p {
48
+ padding: 0;
49
+ }
50
+ }
51
+ @media screen {
52
+ body {
53
+ color: black;
54
+ }
55
+ }
@@ -1,7 +1,7 @@
1
1
  .calc-basic {
2
2
  width: calc(100% - 30px);
3
3
  height: calc(50% + 20px);
4
- margin: calc(10px * 2);
4
+ margin: 20px;
5
5
  padding: calc(100vh - 50px);
6
6
  }
7
7
  .calc-variables {
@@ -11,19 +11,19 @@
11
11
  height: calc(50% + (25vh - 20px));
12
12
  }
13
13
  .calc-nested {
14
- min-height: calc(10vh + calc(5vh));
15
- nested: calc(calc(2.25rem + 2px) - 1px * 2);
14
+ min-height: 15vh;
15
+ nested: calc((2.25rem + 2px) - 2px);
16
16
  }
17
17
  .calc-functions {
18
18
  one: calc(100% - 20px);
19
- two: calc(100% - (10px + 10px));
19
+ two: calc(100% - 20px);
20
20
  bar: calc(1 + 20%);
21
21
  }
22
22
  .calc-escape {
23
- three: calc(100% - (3 * 1));
24
- four: calc(100% - (3 * 1));
23
+ three: calc(100% - 3);
24
+ four: calc(100% - 3);
25
25
  }
26
26
  .calc-mixed {
27
- foo: 3 calc(3 + 4) 11;
28
- height: calc(100% - ((10px * 3) + (10px * 2)));
27
+ foo: 3 7 11;
28
+ height: calc(100% - 50px);
29
29
  }
@@ -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%);
@@ -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;