@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,45 @@
1
+ @media only screen and (max-width: 200px) {
2
+ .body {
3
+ width: 480px;
4
+ }
5
+ }
6
+ @media all and (tv) {
7
+ .all-and-tv {
8
+ var: yes;
9
+ }
10
+ }
11
+ @media screen, print {
12
+ .list {
13
+ margin: 0;
14
+ }
15
+ }
16
+ @container foo (min-width: 400px) {
17
+ .sticky-child {
18
+ font-size: 75%;
19
+ }
20
+ }
21
+ @supports (display: flex) {
22
+ .flex {
23
+ display: flex;
24
+ }
25
+ }
26
+ @supports (display: grid) and (gap: 1rem) {
27
+ .grid {
28
+ display: grid;
29
+ }
30
+ }
31
+ @keyframes enlarger {
32
+ from {
33
+ font-size: 12px;
34
+ }
35
+ to {
36
+ font-size: 15px;
37
+ }
38
+ }
39
+ @namespace less "http://lesscss.org";
40
+ @namespace svgns "http://www.w3.org/2000/svg";
41
+ @layer base {
42
+ .layered {
43
+ color: red;
44
+ }
45
+ }
@@ -0,0 +1,72 @@
1
+ // Less 5 coverage for variable interpolation in non-value at-rule positions
2
+ // (at-rule preludes, names, and identifiers). Less 4.8 added a companion
3
+ // deprecated-bare-@variable fixture; Less 5 keeps the migration target as the
4
+ // positive parse/eval fixture.
5
+
6
+ // --- nestable at-rule preludes ---
7
+ @smartphone: ~"only screen and (max-width: 200px)";
8
+ @media @{smartphone} {
9
+ .body {
10
+ width: 480px;
11
+ }
12
+ }
13
+
14
+ @all: ~"all";
15
+ @tv: ~"(tv)";
16
+ @media @{all} and @{tv} {
17
+ .all-and-tv {
18
+ var: yes;
19
+ }
20
+ }
21
+
22
+ @breakpoint: screen;
23
+ @media @{breakpoint}, print {
24
+ .list {
25
+ margin: 0;
26
+ }
27
+ }
28
+
29
+ @varfoo: foo;
30
+ @threshold: 400px;
31
+ @container @{varfoo} (min-width: @threshold) {
32
+ .sticky-child {
33
+ font-size: 75%;
34
+ }
35
+ }
36
+
37
+ // --- unknown at-rule prelude ---
38
+ @supported: ~"(display: flex)";
39
+ @supports @{supported} {
40
+ .flex {
41
+ display: flex;
42
+ }
43
+ }
44
+
45
+ // A bare @variable in a *nested declaration value* (inside `(...)`) is a
46
+ // declaration value, not a structural at-rule identifier/prelude position.
47
+ @disp: grid;
48
+ @supports (display: @disp) and (gap: 1rem) {
49
+ .grid {
50
+ display: grid;
51
+ }
52
+ }
53
+
54
+ // --- at-rule identifiers / names ---
55
+ @anim: enlarger;
56
+ @keyframes @{anim} {
57
+ from { font-size: 12px; }
58
+ to { font-size: 15px; }
59
+ }
60
+
61
+ @ns: less;
62
+ @namespace @{ns} "http://lesscss.org";
63
+
64
+ @svg-ns: svgns;
65
+ @namespace @{svg-ns} "http://www.w3.org/2000/svg";
66
+
67
+ @layer-name: base;
68
+ @layer @{layer-name} {
69
+ .layered {
70
+ color: red;
71
+ }
72
+ }
@@ -15,7 +15,7 @@
15
15
  @namespace svg url(http://www.w3.org/2000/svg);
16
16
  @viewport {
17
17
  width: device-width;
18
- initial-scale: 1;
18
+ initial-scale: 1.0;
19
19
  }
20
20
  @keyframes slidein {
21
21
  from {
@@ -82,8 +82,8 @@
82
82
  display: none;
83
83
  }
84
84
  }
85
- @media (max-width: 768px) {
86
- .container {
85
+ .container {
86
+ @media (max-width: 768px) {
87
87
  padding: 10px;
88
88
  }
89
89
  }
@@ -95,9 +95,11 @@
95
95
  margin-left: 3cm;
96
96
  margin-right: 4cm;
97
97
  }
98
- @media (max-width: 600px) {
99
- .wrapper .mobile-only {
100
- display: block;
98
+ .wrapper {
99
+ @media (max-width: 600px) {
100
+ .mobile-only {
101
+ display: block;
102
+ }
101
103
  }
102
104
  }
103
105
  @media (min-width: 1024px) {
@@ -0,0 +1,110 @@
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
+ @page {
6
+ margin: 2cm;
7
+ @top-left {
8
+ content: "Page " counter(page);
9
+ }
10
+ }
11
+ @page :first {
12
+ margin: 3cm;
13
+ @top-center {
14
+ content: "First Page";
15
+ }
16
+ }
17
+ @namespace url(http://www.w3.org/1999/xhtml);
18
+ @namespace svg url(http://www.w3.org/2000/svg);
19
+ @viewport {
20
+ width: device-width;
21
+ initial-scale: 1;
22
+ }
23
+ @keyframes slidein {
24
+ from {
25
+ margin-left: 100%;
26
+ width: 300%;
27
+ }
28
+ to {
29
+ margin-left: 0%;
30
+ width: 100%;
31
+ }
32
+ }
33
+ @keyframes "complex-animation" {
34
+ 0% {
35
+ opacity: 0;
36
+ transform: scale(0.5);
37
+ }
38
+ 50% {
39
+ opacity: 0.5;
40
+ transform: scale(1.2);
41
+ }
42
+ 100% {
43
+ opacity: 1;
44
+ transform: scale(1);
45
+ }
46
+ }
47
+ @font-face {
48
+ font-family: "MyFont";
49
+ src: url("myfont.woff2") format("woff2");
50
+ font-weight: normal;
51
+ font-style: normal;
52
+ }
53
+ @font-face {
54
+ font-family: "CustomFont";
55
+ src: url("custom.woff") format("woff");
56
+ }
57
+ @supports (display: grid) {
58
+ .grid-container {
59
+ display: grid;
60
+ grid-template-columns: repeat(3, 1fr);
61
+ }
62
+ }
63
+ @supports (transform-style: preserve-3d) {
64
+ @media (min-width: 768px) {
65
+ .card {
66
+ transform: rotateY(15deg);
67
+ }
68
+ }
69
+ }
70
+ @media print {
71
+ body {
72
+ font-size: 12pt;
73
+ color: black;
74
+ }
75
+ }
76
+ @media screen {
77
+ @supports (display: flex) {
78
+ .container {
79
+ display: flex;
80
+ }
81
+ }
82
+ }
83
+ @media (max-width: 600px) {
84
+ .sidebar {
85
+ display: none;
86
+ }
87
+ }
88
+ @media (max-width: 768px) {
89
+ .container {
90
+ padding: 10px;
91
+ }
92
+ }
93
+ @page :left {
94
+ margin-left: 4cm;
95
+ margin-right: 3cm;
96
+ }
97
+ @page :right {
98
+ margin-left: 3cm;
99
+ margin-right: 4cm;
100
+ }
101
+ @media (max-width: 600px) {
102
+ .wrapper .mobile-only {
103
+ display: block;
104
+ }
105
+ }
106
+ @media (min-width: 1024px) {
107
+ .desktop {
108
+ display: block;
109
+ }
110
+ }
@@ -0,0 +1,5 @@
1
+ export default {
2
+ output: [
3
+ { file: '{name}.css', collapseNesting: false }
4
+ ]
5
+ }
@@ -0,0 +1,121 @@
1
+ .parent {
2
+ color: green;
3
+ }
4
+ @document url-prefix() {
5
+ .parent .child {
6
+ color: red;
7
+ }
8
+ }
9
+ @supports (sandwitch: butter) {
10
+ .inside .top {
11
+ property: value;
12
+ }
13
+ }
14
+ @supports (sandwitch: bread) {
15
+ .in1 .in2 {
16
+ property: value;
17
+ }
18
+ }
19
+ @supports (sandwitch: ham) {
20
+ .inside .top {
21
+ property: value;
22
+ }
23
+ }
24
+ @supports (font-family: weirdFont) {
25
+ @font-face {
26
+ font-family: something;
27
+ src: made-up-url;
28
+ }
29
+ }
30
+ @font-face {
31
+ @supports not (-webkit-font-smoothing: subpixel-antialiased) {
32
+ font-family: something;
33
+ src: made-up-url;
34
+ }
35
+ }
36
+ @supports (property: value) {
37
+ @media (max-size: 2px) {
38
+ @supports (whatever: something) {
39
+ .outOfMedia {
40
+ property: value;
41
+ }
42
+ }
43
+ }
44
+ }
45
+ @supports (property: value) {
46
+ @media (max-size: 2px) {
47
+ @supports (whatever: something) {
48
+ .onTop {
49
+ property: value;
50
+ }
51
+ }
52
+ }
53
+ }
54
+ @media print {
55
+ html {
56
+ in-html: visible;
57
+ }
58
+ @supports (upper: test) {
59
+ html {
60
+ in-supports: first;
61
+ }
62
+ html div {
63
+ in-div: visible;
64
+ }
65
+ @supports not (-webkit-font-smoothing: subpixel-antialiased) {
66
+ html div {
67
+ in-supports: second;
68
+ }
69
+ @media screen {
70
+ html div {
71
+ font-weight: 400;
72
+ }
73
+ html div nested {
74
+ property: value;
75
+ }
76
+ }
77
+ }
78
+ }
79
+ }
80
+ @media print {
81
+ @media (max-size: 2px) {
82
+ .in1 {
83
+ stay: here;
84
+ }
85
+ @supports not (-webkit-font-smoothing: subpixel-antialiased) {
86
+ @supports (whatever: something) {
87
+ .in2 .in1 {
88
+ property: value;
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ html {
95
+ font-weight: 300;
96
+ -webkit-font-smoothing: subpixel-antialiased;
97
+ }
98
+ @supports not (-webkit-font-smoothing: subpixel-antialiased) {
99
+ html {
100
+ font-weight: 400;
101
+ }
102
+ html nested {
103
+ property: value;
104
+ }
105
+ }
106
+ @font-face {
107
+ font-family: something;
108
+ src: made-up-url;
109
+ }
110
+ @keyframes "textscale" {
111
+ 0% {
112
+ font-size: 1em;
113
+ }
114
+ 100% {
115
+ font-size: 2em;
116
+ }
117
+ }
118
+ .onTop {
119
+ animation: "textscale";
120
+ font-family: something;
121
+ }
@@ -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
  }