@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,101 @@
1
+ /* Less 4.x output, recorded when this fixture graduated to v5.
2
+ Historical record only — no test reads this file. */
3
+
4
+ input[type="text"].class#id[attr=i32]:not(.one) {
5
+ color: inherit;
6
+ }
7
+ div#id.class[a=one][b=two].class:not(.one) {
8
+ color: inherit;
9
+ }
10
+ @media print {
11
+ .class {
12
+ color: blue;
13
+ }
14
+ .class .sub {
15
+ width: 42;
16
+ }
17
+ }
18
+ .visible {
19
+ color: red;
20
+ }
21
+ .visible .c {
22
+ color: green;
23
+ }
24
+ .visible {
25
+ color: green;
26
+ }
27
+ .visible:hover {
28
+ color: green;
29
+ }
30
+ .visible + .visible {
31
+ color: green;
32
+ }
33
+ .visible + .visible .sub {
34
+ color: green;
35
+ }
36
+ @supports (something: else) {
37
+ .class {
38
+ something: else;
39
+ }
40
+ .nestedToo .class {
41
+ something: else;
42
+ }
43
+ }
44
+ .b {
45
+ color: red;
46
+ }
47
+ .b .c {
48
+ color: green;
49
+ }
50
+ .b {
51
+ color: green;
52
+ }
53
+ .b:hover {
54
+ color: green;
55
+ }
56
+ .b {
57
+ color: green;
58
+ }
59
+ .b + .b {
60
+ color: green;
61
+ }
62
+ .b + .b .sub {
63
+ color: green;
64
+ }
65
+ .y {
66
+ pulled-in: yes /* inline comment survives */;
67
+ }
68
+ /* comment pulled in */
69
+ .visible {
70
+ extend: test;
71
+ }
72
+ .test-rule-mediaq-import {
73
+ color: green;
74
+ test: 340px;
75
+ }
76
+ @media (max-size: 450px) {
77
+ .test-rule-mediaq-import {
78
+ color: red;
79
+ }
80
+ }
81
+ .test-rule {
82
+ color: red;
83
+ }
84
+ .test-rule:first-child {
85
+ color: blue;
86
+ }
87
+ @keyframes some-name {
88
+ property: value;
89
+ }
90
+ @supports (animation-name: test) {
91
+ @keyframes some-name {
92
+ property: value;
93
+ }
94
+ .selector {
95
+ color: red;
96
+ }
97
+ }
98
+ div {
99
+ this isn't very valid CSS.
100
+ }
101
+ this isn't very valid CSS.
@@ -1,7 +1,8 @@
1
1
  module.exports = {
2
2
  language: {
3
- less: {
4
- "syncImport": true
5
- }
6
- }
3
+ less: {}
4
+ },
5
+ output: [
6
+ { file: '{name}.css', collapseNesting: false }
7
+ ]
7
8
  };
@@ -3,14 +3,18 @@
3
3
  @import url("/import/layer-import-4.css") layer(print) print;
4
4
  @import url("/import/layer-import-4.css") layer(print) print, (max-width: 600px);
5
5
  @import url("/import/layer-import-5.css") layer(features) supports(display: grid);
6
- @layer {
7
- .main::before {
8
- color: #f00;
6
+ .main {
7
+ @layer {
8
+ &::before {
9
+ color: #f00;
10
+ }
9
11
  }
10
12
  }
11
13
  @layer legacy {
12
- .sub-rule ul {
13
- color: white;
14
+ .sub-rule {
15
+ ul {
16
+ color: white;
17
+ }
14
18
  }
15
19
  }
16
20
  @layer primevue {
@@ -30,10 +34,10 @@
30
34
  body {
31
35
  margin: 0;
32
36
  font-family: system-ui, sans-serif;
33
- }
34
- body header {
35
- background-color: #f0f0f0;
36
- padding: 1rem;
37
+ header {
38
+ background-color: #f0f0f0;
39
+ padding: 1rem;
40
+ }
37
41
  }
38
42
  }
39
43
  @layer components {
@@ -42,9 +46,9 @@
42
46
  padding: 0.5rem 1rem;
43
47
  background-color: blue;
44
48
  color: white;
45
- }
46
- .button:hover {
47
- background-color: darkblue;
49
+ &:hover {
50
+ background-color: darkblue;
51
+ }
48
52
  }
49
53
  }
50
54
  @layer utilities {
@@ -53,21 +57,19 @@
53
57
  }
54
58
  .responsive {
55
59
  width: 100%;
56
- }
57
- @media (min-width: 768px) {
58
- .responsive {
60
+ @media (min-width: 768px) {
59
61
  width: 50%;
60
62
  }
61
63
  }
62
64
  }
63
65
  .parent {
64
66
  color: black;
65
- }
66
- .parent .child {
67
- color: red;
68
- }
69
- .parent:hover {
70
- background: lightgray;
67
+ .child {
68
+ color: red;
69
+ }
70
+ &:hover {
71
+ background: lightgray;
72
+ }
71
73
  }
72
74
  @layer foo.baz {
73
75
  .bar {
@@ -99,9 +101,9 @@ body {
99
101
  @layer components {
100
102
  .btn {
101
103
  color: red;
102
- }
103
- .btn:hover {
104
- color: blue;
104
+ &:hover {
105
+ color: blue;
106
+ }
105
107
  }
106
108
  }
107
109
  @layer {
@@ -117,10 +119,10 @@ body {
117
119
  }
118
120
  .feature {
119
121
  color: gray;
120
- }
121
- @layer component {
122
- .feature h2 {
123
- font-size: 1.5rem;
122
+ @layer component {
123
+ h2 {
124
+ font-size: 1.5rem;
125
+ }
124
126
  }
125
127
  }
126
128
  @layer ui {
@@ -0,0 +1,136 @@
1
+ /* Less 4.x output, recorded when this fixture graduated to v5.
2
+ Historical record only — no test reads this file. */
3
+
4
+ @import url("/import/layer-import-2.css") layer(foo);
5
+ @import url("/import/layer-import-3.css") layer(responsive) supports(display: flex) screen and (max-width: 768px);
6
+ @import url("/import/layer-import-4.css") layer(print) print;
7
+ @import url("/import/layer-import-4.css") layer(print) print, (max-width: 600px);
8
+ @import url("/import/layer-import-5.css") layer(features) supports(display: grid);
9
+ @layer {
10
+ .main::before {
11
+ color: #f00;
12
+ }
13
+ }
14
+ @layer legacy {
15
+ .sub-rule ul {
16
+ color: white;
17
+ }
18
+ }
19
+ @layer primevue {
20
+ .test {
21
+ foo: bar;
22
+ }
23
+ }
24
+ @layer reset, base, components, utilities;
25
+ @layer reset {
26
+ *,
27
+ *::before,
28
+ *::after {
29
+ box-sizing: border-box;
30
+ }
31
+ }
32
+ @layer base {
33
+ body {
34
+ margin: 0;
35
+ font-family: system-ui, sans-serif;
36
+ }
37
+ body header {
38
+ background-color: #f0f0f0;
39
+ padding: 1rem;
40
+ }
41
+ }
42
+ @layer components {
43
+ .button {
44
+ display: inline-block;
45
+ padding: 0.5rem 1rem;
46
+ background-color: blue;
47
+ color: white;
48
+ }
49
+ .button:hover {
50
+ background-color: darkblue;
51
+ }
52
+ }
53
+ @layer utilities {
54
+ .text-center {
55
+ text-align: center;
56
+ }
57
+ .responsive {
58
+ width: 100%;
59
+ }
60
+ @media (min-width: 768px) {
61
+ .responsive {
62
+ width: 50%;
63
+ }
64
+ }
65
+ }
66
+ .parent {
67
+ color: black;
68
+ }
69
+ .parent .child {
70
+ color: red;
71
+ }
72
+ .parent:hover {
73
+ background: lightgray;
74
+ }
75
+ @layer foo.baz {
76
+ .bar {
77
+ font-weight: bold;
78
+ }
79
+ }
80
+ @layer framework {
81
+ @layer layout {
82
+ .container {
83
+ display: grid;
84
+ gap: 2rem;
85
+ }
86
+ }
87
+ }
88
+ @layer framework.layout {
89
+ main {
90
+ padding: 2rem;
91
+ }
92
+ p {
93
+ margin-block: 1rem;
94
+ color: #555;
95
+ }
96
+ }
97
+ @layer theme;
98
+ @layer layout, utilities;
99
+ body {
100
+ color: black;
101
+ }
102
+ @layer components {
103
+ .btn {
104
+ color: red;
105
+ }
106
+ .btn:hover {
107
+ color: blue;
108
+ }
109
+ }
110
+ @layer {
111
+ p {
112
+ margin-block: 1rem;
113
+ }
114
+ }
115
+ @layer framework.buttons.primary {
116
+ .btn-primary {
117
+ background: dodgerblue;
118
+ color: white;
119
+ }
120
+ }
121
+ .feature {
122
+ color: gray;
123
+ }
124
+ @layer component {
125
+ .feature h2 {
126
+ font-size: 1.5rem;
127
+ }
128
+ }
129
+ @layer ui {
130
+ .btn {
131
+ padding: 0.5rem 1rem;
132
+ border-radius: 4px;
133
+ background: rebeccapurple;
134
+ color: white;
135
+ }
136
+ }
@@ -0,0 +1,5 @@
1
+ export default {
2
+ output: [
3
+ { file: '{name}.css', collapseNesting: false }
4
+ ]
5
+ }
@@ -3,6 +3,7 @@
3
3
  b: cos(var(--a));
4
4
  c: calc(tan(var(--t)) * 1px);
5
5
  d: atan2(var(--x), var(--y));
6
+ e: percentage(var(--p));
6
7
  }
7
8
  .numeric {
8
9
  a: 0.5;
@@ -5,6 +5,7 @@
5
5
  b: cos(var(--a));
6
6
  c: calc(tan(var(--t)) * 1px);
7
7
  d: atan2(var(--x), var(--y));
8
+ e: percentage(var(--p));
8
9
  }
9
10
 
10
11
  // Concrete numeric arguments still evaluate.
@@ -0,0 +1,274 @@
1
+ /* Less 4.x output, recorded when this fixture graduated to v5.
2
+ Historical record only — no test reads this file. */
3
+
4
+ @media print {
5
+ .class {
6
+ color: blue;
7
+ }
8
+ .class .sub {
9
+ width: 42;
10
+ }
11
+ .top,
12
+ header > h1 {
13
+ color: #444444;
14
+ }
15
+ }
16
+ @media screen {
17
+ .body {
18
+ max-width: 480;
19
+ }
20
+ }
21
+ @media all and (device-aspect-ratio: 16 / 9) {
22
+ .body {
23
+ max-width: 800px;
24
+ }
25
+ }
26
+ @media all and (orientation: portrait) {
27
+ aside {
28
+ float: none;
29
+ }
30
+ }
31
+ @media handheld and (min-width: 42), screen and (min-width: 20em) {
32
+ .body {
33
+ max-width: 480px;
34
+ }
35
+ }
36
+ @media print {
37
+ .body {
38
+ padding: 20px;
39
+ }
40
+ .body header {
41
+ background-color: red;
42
+ }
43
+ }
44
+ @media print and (orientation: landscape) {
45
+ .body {
46
+ margin-left: 20px;
47
+ }
48
+ }
49
+ @media screen {
50
+ .sidebar {
51
+ width: 300px;
52
+ }
53
+ }
54
+ @media screen and (orientation: landscape) {
55
+ .sidebar {
56
+ width: 500px;
57
+ }
58
+ }
59
+ @media a and (b) {
60
+ .first .second .third {
61
+ width: 300px;
62
+ }
63
+ .first .second .fourth {
64
+ width: 3;
65
+ }
66
+ }
67
+ @media a and (b) and (c) {
68
+ .first .second .third {
69
+ width: 500px;
70
+ }
71
+ }
72
+ @media a, (b) and (c) {
73
+ .body {
74
+ width: 95%;
75
+ }
76
+ }
77
+ @media a and (x), (b) and (c) and (x), a and (y), (b) and (c) and (y) {
78
+ .body {
79
+ width: 100%;
80
+ }
81
+ }
82
+ .a {
83
+ background: black;
84
+ }
85
+ @media handheld {
86
+ .a {
87
+ background: white;
88
+ }
89
+ }
90
+ @media handheld and (max-width: 100px) {
91
+ .a {
92
+ background: red;
93
+ }
94
+ }
95
+ .b {
96
+ background: black;
97
+ }
98
+ @media handheld {
99
+ .b {
100
+ background: white;
101
+ }
102
+ }
103
+ @media handheld and (max-width: 200px) {
104
+ .b {
105
+ background: red;
106
+ }
107
+ }
108
+ @media only screen and (max-width: 200px) {
109
+ .body {
110
+ width: 480px;
111
+ }
112
+ }
113
+ @media print {
114
+ @page :left {
115
+ margin: 0.5cm;
116
+ }
117
+ @page :right {
118
+ margin: 0.5cm;
119
+ }
120
+ @page Test:first {
121
+ margin: 1cm;
122
+ }
123
+ @page :first {
124
+ size: 8.5in 11in;
125
+ @top-left {
126
+ margin: 1cm;
127
+ }
128
+ @top-left-corner {
129
+ margin: 1cm;
130
+ }
131
+ @top-center {
132
+ margin: 1cm;
133
+ }
134
+ @top-right {
135
+ margin: 1cm;
136
+ }
137
+ @top-right-corner {
138
+ margin: 1cm;
139
+ }
140
+ @bottom-left {
141
+ margin: 1cm;
142
+ }
143
+ @bottom-left-corner {
144
+ margin: 1cm;
145
+ }
146
+ @bottom-center {
147
+ margin: 1cm;
148
+ }
149
+ @bottom-right {
150
+ margin: 1cm;
151
+ }
152
+ @bottom-right-corner {
153
+ margin: 1cm;
154
+ }
155
+ @left-top {
156
+ margin: 1cm;
157
+ }
158
+ @left-middle {
159
+ margin: 1cm;
160
+ }
161
+ @left-bottom {
162
+ margin: 1cm;
163
+ }
164
+ @right-top {
165
+ margin: 1cm;
166
+ }
167
+ @right-middle {
168
+ content: "Page " counter(page);
169
+ }
170
+ @right-bottom {
171
+ margin: 1cm;
172
+ }
173
+ }
174
+ }
175
+ @media (-webkit-min-device-pixel-ratio: 2), (min--moz-device-pixel-ratio: 2), (-o-min-device-pixel-ratio: 2/1), (min-resolution: 2dppx), (min-resolution: 128dpcm) {
176
+ .b {
177
+ background: red;
178
+ }
179
+ }
180
+ .body {
181
+ background: red;
182
+ }
183
+ @media (max-width: 500px) {
184
+ .body {
185
+ background: green;
186
+ }
187
+ }
188
+ @media (max-width: 1000px) {
189
+ .body {
190
+ background: red;
191
+ background: blue;
192
+ }
193
+ }
194
+ @media (max-width: 1000px) and (max-width: 500px) {
195
+ .body {
196
+ background: green;
197
+ }
198
+ }
199
+ @media (max-width: 1200px) {
200
+ /* a comment */
201
+ }
202
+ @media (max-width: 1200px) and (max-width: 900px) {
203
+ .body {
204
+ font-size: 11px;
205
+ }
206
+ }
207
+ @media (min-width: 480px) {
208
+ .nav-justified > li {
209
+ display: table-cell;
210
+ }
211
+ }
212
+ @media (min-width: 768px) and (min-width: 480px) {
213
+ .menu > li {
214
+ display: table-cell;
215
+ }
216
+ }
217
+ @media all and (tv) {
218
+ .all-and-tv-variables {
219
+ var: all-and-tv;
220
+ }
221
+ }
222
+ @media screen and (min-width: 61px) {
223
+ .selector {
224
+ foo: bar;
225
+ }
226
+ }
227
+ @media screen and (color), projection and (color) {
228
+ .selector {
229
+ color: #eee;
230
+ }
231
+ }
232
+ @media not (width <= -100px) {
233
+ body {
234
+ background: green;
235
+ }
236
+ }
237
+ @media (height > -100px) {
238
+ body {
239
+ background: green;
240
+ }
241
+ }
242
+ @media not (resolution: -300dpi) {
243
+ body {
244
+ background: green;
245
+ }
246
+ }
247
+ @media (min-orientation: portrait) {
248
+ body {
249
+ background: green;
250
+ }
251
+ }
252
+ @media print and (min-resolution: 118dpcm) {
253
+ body {
254
+ background: green;
255
+ }
256
+ }
257
+ @media (200px <= width <= 500px) {
258
+ .test-range-syntax {
259
+ padding: 0;
260
+ }
261
+ }
262
+ .selector {
263
+ color: #eee;
264
+ }
265
+ @media (200px <= width <= 500px) {
266
+ .selector .test-range-syntax {
267
+ padding: 0;
268
+ }
269
+ }
270
+ @media print, (max-width: 992px) {
271
+ div {
272
+ color: red;
273
+ }
274
+ }