@less/test-data 4.9.0 → 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.
- package/UPSTREAM-FIXTURE-SYNC.md +54 -0
- package/package.json +4 -1
- package/styles.config.ts +15 -0
- package/tests-config/3rd-party/styles.config.cjs +1 -1
- package/tests-config/compression/styles.config.cjs +1 -1
- package/tests-config/debug/all/styles.config.cjs +1 -1
- package/tests-config/debug/comments/styles.config.cjs +1 -1
- package/tests-config/debug/mediaquery/styles.config.cjs +1 -1
- package/tests-config/filemanagerPlugin/styles.config.cjs +1 -1
- package/tests-config/functions-harness/functions-harness.css +8 -0
- package/tests-config/functions-harness/functions-harness.less +10 -0
- package/tests-config/js-type-errors/js-type-error-2.txt +4 -0
- package/tests-config/js-type-errors/js-type-error.txt +1 -1
- package/tests-config/namespacing/legacy/namespacing-7.css +15 -0
- package/tests-config/namespacing/namespacing-5.less +3 -3
- package/tests-config/namespacing/namespacing-7.css +16 -8
- package/tests-config/namespacing/styles.config.cjs +4 -1
- package/tests-config/sourcemaps/styles.config.cjs +1 -1
- package/tests-config/sourcemaps-variable-selector/styles.config.cjs +1 -1
- package/tests-config/strict-imports/legacy/strict-imports.css +14 -0
- package/tests-config/strict-imports/strict-imports.css +4 -2
- package/tests-config/strict-imports/styles.config.cjs +6 -5
- package/tests-error/eval/ampersand-merge-template-invalid.less +7 -0
- package/tests-error/eval/ampersand-merge-template-invalid.txt +1 -0
- package/tests-error/eval/at-rules-undefined-var.less +1 -1
- package/tests-error/eval/property-undefined.txt +1 -0
- package/tests-error/eval/recursive-property.txt +1 -0
- package/tests-unit/at-rule-variable-deprecated/at-rule-variable-deprecated.css +0 -38
- package/tests-unit/at-rule-variable-deprecated/at-rule-variable-deprecated.less +0 -70
- package/tests-unit/at-rule-variable-interpolation/at-rule-variable-interpolation.css +45 -0
- package/tests-unit/at-rule-variable-interpolation/at-rule-variable-interpolation.less +72 -0
- package/tests-unit/at-rules/at-rules.css +8 -6
- package/tests-unit/at-rules/legacy/at-rules.css +110 -0
- package/tests-unit/at-rules/styles.config.ts +5 -0
- package/tests-unit/at-rules-bubbling/at-rules-bubbling.css +121 -0
- package/tests-unit/at-rules-bubbling/legacy/at-rules-bubbling.css +122 -0
- package/tests-unit/at-rules-keyword-comments/at-rules-keyword-comments.css +2 -5
- package/tests-unit/at-rules-keyword-comments/legacy/at-rules-keyword-comments.css +12 -0
- package/tests-unit/at-rules-targeted/at-rules-targeted.css +5 -3
- package/tests-unit/at-rules-targeted/legacy/at-rules-targeted.css +55 -0
- package/tests-unit/calc/calc.css +8 -8
- package/tests-unit/calc/calc.less +1 -0
- package/tests-unit/calc/legacy/calc.css +32 -0
- package/tests-unit/color-functions/basic.css +1 -1
- package/tests-unit/color-functions/comprehensive.css +5 -5
- package/tests-unit/color-functions/comprehensive.less +1 -0
- package/tests-unit/color-functions/formats.css +0 -12
- package/tests-unit/color-functions/formats.less +0 -15
- package/tests-unit/color-functions/legacy/basic.css +21 -0
- package/tests-unit/color-functions/legacy/comprehensive.css +48 -0
- package/tests-unit/color-functions/legacy/modern-syntax.css +9 -0
- package/tests-unit/color-functions/legacy/operations.css +18 -0
- package/tests-unit/color-functions/legacy/rgba.css +20 -0
- package/tests-unit/color-functions/modern-syntax.css +4 -4
- package/tests-unit/color-functions/modern-syntax.less +1 -0
- package/tests-unit/color-functions/operations.less +1 -0
- package/tests-unit/color-functions/rgba.css +3 -3
- package/tests-unit/color-functions/rgba.less +3 -1
- package/tests-unit/comments/comments.css +5 -6
- package/tests-unit/comments/comments.less +2 -1
- package/tests-unit/comments/comments2.css +4 -6
- package/tests-unit/comments/comments2.less +3 -0
- package/tests-unit/comments/legacy/comments.css +86 -0
- package/tests-unit/comments/legacy/comments2.css +21 -0
- package/tests-unit/container/container.css +40 -83
- package/tests-unit/container/container.less +28 -82
- package/tests-unit/container/legacy/container.css +273 -0
- package/tests-unit/container/styles.config.ts +8 -0
- package/tests-unit/css-3/css-3.css +4 -4
- package/tests-unit/css-3/legacy/css-3.css +147 -0
- package/tests-unit/css-escapes/css-escapes.css +4 -4
- package/tests-unit/css-escapes/legacy/css-escapes.css +34 -0
- package/tests-unit/css-escapes/styles.config.ts +5 -0
- package/tests-unit/css-grid/css-grid.css +4 -1
- package/tests-unit/css-grid/legacy/css-grid.css +27 -0
- package/tests-unit/css-guards/css-guards.less +2 -1
- package/tests-unit/detached-rulesets/detached-rulesets.css +26 -18
- package/tests-unit/detached-rulesets/legacy/detached-rulesets.css +79 -0
- package/tests-unit/directives-bubbling/directives-bubbling.css +16 -14
- package/tests-unit/extend/extend.css +22 -28
- package/tests-unit/extend/legacy/extend.css +79 -0
- package/tests-unit/extend/styles.config.ts +5 -0
- package/tests-unit/extend-chaining/extend-chaining.css +7 -10
- package/tests-unit/extend-chaining/legacy/extend-chaining.css +84 -0
- package/tests-unit/extend-clearfix/extend-clearfix.css +1 -3
- package/tests-unit/extend-clearfix/extend-clearfix.less +0 -1
- package/tests-unit/{extend → extend-clearfix/legacy}/extend-clearfix.css +3 -0
- package/tests-unit/extend-exact/extend-exact.css +25 -24
- package/tests-unit/extend-exact/legacy/extend-exact.css +40 -0
- package/tests-unit/extend-exact/styles.config.ts +5 -0
- package/tests-unit/extend-media/extend-media.css +9 -14
- package/tests-unit/extend-media/legacy/extend-media.css +27 -0
- package/tests-unit/extend-media/styles.config.ts +5 -0
- package/tests-unit/extend-nest/extend-nest.css +3 -22
- package/tests-unit/extend-nest/legacy/extend-nest.css +60 -0
- package/tests-unit/extend-selector/extend-selector.css +42 -67
- package/tests-unit/extend-selector/extend-selector.less +0 -15
- package/tests-unit/extend-selector/legacy/extend-selector.css +73 -0
- package/tests-unit/extend-selector/styles.config.ts +5 -0
- package/tests-unit/extract-and-length/extract-and-length.css +6 -5
- package/tests-unit/extract-and-length/extract-and-length.less +7 -2
- package/tests-unit/extract-and-length/legacy/extract-and-length.css +137 -0
- package/tests-unit/functions/functions.css +5 -16
- package/tests-unit/functions/functions.less +7 -20
- package/tests-unit/functions/legacy/functions.css +244 -0
- package/tests-unit/functions/legacy/functions.less +296 -0
- package/tests-unit/functions-each/functions-each.css +4 -2
- package/tests-unit/import/import-reference-issues.css +6 -6
- package/tests-unit/import/import-reference.css +4 -2
- package/tests-unit/import/legacy/import-reference-issues.css +27 -0
- package/tests-unit/import/legacy/import-reference.css +101 -0
- package/tests-unit/import/styles.config.cjs +5 -4
- package/tests-unit/layer/layer.css +30 -28
- package/tests-unit/layer/legacy/layer.css +136 -0
- package/tests-unit/layer/styles.config.ts +5 -0
- package/tests-unit/math-css-vars/math-css-vars.css +1 -0
- package/tests-unit/math-css-vars/math-css-vars.less +1 -0
- package/tests-unit/media/legacy/media.css +274 -0
- package/tests-unit/media/media.css +49 -43
- package/tests-unit/media/media.less +0 -2
- package/tests-unit/media/styles.config.cjs +5 -0
- package/tests-unit/merge/merge.css +2 -2
- package/tests-unit/mixin-noparens/legacy/mixin-noparens.css +10 -0
- package/tests-unit/mixin-noparens/mixin-noparens.css +4 -2
- package/tests-unit/mixin-noparens/styles.config.ts +5 -0
- package/tests-unit/mixins/legacy/maps.css +9 -0
- package/tests-unit/mixins/legacy/mixins.css +147 -0
- package/tests-unit/mixins/maps.css +7 -5
- package/tests-unit/mixins/mixins.css +7 -5
- package/tests-unit/mixins/styles.config.ts +5 -0
- package/tests-unit/mixins-closure/legacy/mixins-closure.css +12 -0
- package/tests-unit/mixins-closure/mixins-closure.css +4 -2
- package/tests-unit/mixins-closure/styles.config.ts +5 -0
- package/tests-unit/mixins-guards/legacy/mixins-guards.css +214 -0
- package/tests-unit/mixins-guards/mixins-guards.css +5 -3
- package/tests-unit/mixins-guards/mixins-guards.less +0 -1
- package/tests-unit/mixins-guards/styles.config.ts +5 -0
- package/tests-unit/mixins-guards-default-func/legacy/mixins-guards-default-func.css +132 -0
- package/tests-unit/mixins-guards-default-func/mixins-guards-default-func.css +0 -2
- package/tests-unit/mixins-important/mixins-important.css +33 -19
- package/tests-unit/mixins-interpolated/legacy/mixins-interpolated.css +42 -0
- package/tests-unit/mixins-interpolated/mixins-interpolated.css +24 -14
- package/tests-unit/mixins-interpolated/styles.config.ts +5 -0
- package/tests-unit/mixins-nested/legacy/mixins-nested.css +17 -0
- package/tests-unit/mixins-nested/mixins-nested.css +16 -12
- package/tests-unit/mixins-nested/styles.config.ts +5 -0
- package/tests-unit/nesting/legacy/nesting.css +27 -0
- package/tests-unit/nesting/nesting-uncollapsed.css +26 -0
- package/tests-unit/nesting/nesting.css +1 -1
- package/tests-unit/nesting/styles.config.ts +6 -0
- package/tests-unit/operations/operations.css +4 -2
- package/tests-unit/parse-interpolation/legacy/parse-interpolation.css +39 -0
- package/tests-unit/parse-interpolation/parse-interpolation.css +72 -35
- package/tests-unit/parse-interpolation/parse-interpolation.less +73 -25
- package/tests-unit/parse-interpolation/styles.config.ts +5 -0
- package/tests-unit/parser-property-interp/parser-property-interp.css +1 -1
- package/tests-unit/parser-property-interp/parser-property-interp.less +2 -2
- package/tests-unit/parser-slashed-combinator/parser-slashed-combinator.css +1 -9
- package/tests-unit/parser-slashed-combinator/parser-slashed-combinator.less +11 -11
- package/tests-unit/plugin/styles.config.ts +11 -0
- package/tests-unit/property-accessors/legacy/property-accessors.css +60 -0
- package/tests-unit/property-accessors/property-accessors.css +15 -7
- package/tests-unit/property-name-interp/legacy/property-name-interp.css +24 -0
- package/tests-unit/property-name-interp/property-name-interp.css +1 -1
- package/tests-unit/property-name-interp/property-name-interp.less +4 -2
- package/tests-unit/property-targeted/legacy/property-targeted.css +7 -0
- package/tests-unit/property-targeted/property-targeted.css +1 -1
- package/tests-unit/rulesets/legacy/rulesets.css +31 -0
- package/tests-unit/rulesets/rulesets.css +30 -30
- package/tests-unit/rulesets/styles.config.ts +5 -0
- package/tests-unit/scope/legacy/scope.css +41 -0
- package/tests-unit/scope/scope.css +1 -1
- package/tests-unit/selectors/selectors.css +13 -41
- package/tests-unit/styles.config.cjs +1 -1
- package/tests-unit/styles.config.ts +8 -0
- package/tests-unit/variables/legacy/variable-advanced.css +58 -0
- package/tests-unit/variables/variable-advanced.css +1 -4
- package/tests-unit/variables/variable-advanced.less +5 -4
- package/tests-unit/variables-in-at-rules/variables-in-at-rules.less +3 -2
- package/tests-unit/whitespace/legacy/whitespace.css +45 -0
- package/tests-unit/whitespace/whitespace.css +3 -2
- package/tests-warnings/parentless-ampersand-nested.less +6 -0
- package/tests-warnings/parentless-ampersand-nested.txt +42 -0
- package/tests-warnings/parentless-ampersand.less +3 -0
- package/tests-warnings/parentless-ampersand.txt +21 -0
- package/tests-config/rootpath-escape-interpolation/rootpath-escape-interpolation.css +0 -8
- package/tests-config/rootpath-escape-interpolation/rootpath-escape-interpolation.less +0 -24
- package/tests-config/rootpath-escape-interpolation/styles.config.cjs +0 -8
- package/tests-config/sourcemaps/url-interpolation/styles.config.cjs +0 -9
- package/tests-config/sourcemaps/url-interpolation/url-interpolation.css +0 -13
- package/tests-config/sourcemaps/url-interpolation/url-interpolation.less +0 -24
- package/tests-error/parse/property-interpolation-lookup.less +0 -8
- package/tests-error/parse/property-interpolation-lookup.txt +0 -4
- package/tests-unit/extend/extend-clearfix.less +0 -19
- package/tests-unit/lookup-interpolation/lookup-interpolation.css +0 -60
- package/tests-unit/lookup-interpolation/lookup-interpolation.less +0 -127
- package/tests-unit/media-nested-type/media-nested-type.css +0 -40
- package/tests-unit/media-nested-type/media-nested-type.less +0 -51
- /package/tests-unit/{directives-bubbling/directives-bubbling.less → at-rules-bubbling/at-rules-bubbling.less} +0 -0
- /package/tests-unit/{ie-filters → ie-filters-REMOVED/legacy}/ie-filters.css +0 -0
- /package/tests-unit/{ie-filters → ie-filters-REMOVED/legacy}/ie-filters.less +0 -0
- /package/tests-unit/{javascript → javascript-REMOVED/legacy}/javascript.css +0 -0
- /package/tests-unit/{javascript → javascript-REMOVED/legacy}/javascript.less +0 -0
- /package/tests-unit/{javascript → javascript-REMOVED/legacy}/styles.config.cjs +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Upstream Fixture Sync Notes
|
|
2
|
+
|
|
3
|
+
## Verification snapshot
|
|
4
|
+
|
|
5
|
+
Rechecked on 2026-07-29 from PR #19 head `4abb411c` after fetching `origin`
|
|
6
|
+
and `upstream`:
|
|
7
|
+
|
|
8
|
+
- `origin/less-5-alpha.1` is also `4abb411c`.
|
|
9
|
+
- `upstream/alpha` is `330e9d71`; `HEAD...upstream/alpha` is `125 0`.
|
|
10
|
+
- `upstream/master` is `89c33e09`; `HEAD...upstream/master` is `108 40`.
|
|
11
|
+
|
|
12
|
+
The fixture/test-data commits in `8ae2cc3b..upstream/master` are the entries
|
|
13
|
+
classified below: #4462, #4461, #4469, #4472, #4473, #4477, and #4479, plus
|
|
14
|
+
release metadata commits #4463, #4471, #4475, and #4482. No additional
|
|
15
|
+
upstream fixture commit is currently unclassified for alpha.1.
|
|
16
|
+
|
|
17
|
+
## PR #19 scout list
|
|
18
|
+
|
|
19
|
+
- `48a386f6` selector regression: ported in `tests-unit/selectors`.
|
|
20
|
+
- `da514037` media parenthesis regression: ported in `tests-unit/media`.
|
|
21
|
+
- `d250d620` function/condition regressions: ported in `tests-unit/functions`
|
|
22
|
+
and `tests-unit/mixins-guards`.
|
|
23
|
+
- `6161ecf2` inline condition-expression comparison:
|
|
24
|
+
`boolean((2 > 1) = (3 > 2))` is intentionally out of scope for alpha.1;
|
|
25
|
+
Jess currently reports `Direct Less comparison requires value operands`.
|
|
26
|
+
- `ea62d748` container mixin parameter regression: ported in
|
|
27
|
+
`tests-unit/container`; bare container-name variables use interpolation form
|
|
28
|
+
for the Less 5 alpha deprecation contract.
|
|
29
|
+
- `888f6877` container name regressions: simple camelCase, underscore, and
|
|
30
|
+
non-ASCII names are ported. Comma-list container queries, `style(...)`
|
|
31
|
+
feature functions, custom-ident names such as `--body`, and escaped names
|
|
32
|
+
such as `contact\.body` remain out of scope for alpha.1.
|
|
33
|
+
- `d38b43a1` container `style()` comparison/range syntax is intentionally out
|
|
34
|
+
of scope for alpha.1; those inputs are parser errors in the current Jess-backed
|
|
35
|
+
Less wrapper.
|
|
36
|
+
- `83bc8d40` color `calc()` regression: ported in
|
|
37
|
+
`tests-unit/color-functions/modern`.
|
|
38
|
+
- `c58808fd` and `8e1105f0` bare `@var` deprecation/migration: the migration
|
|
39
|
+
fixtures are ported to interpolation-positive coverage. The upstream Less 4
|
|
40
|
+
parser deprecation warning matrix is intentionally not active for alpha.1;
|
|
41
|
+
the Jess-backed wrapper exposes a different structured-warning path.
|
|
42
|
+
- `6b04d2d6` named-args mixin arity regression: ported in
|
|
43
|
+
`tests-unit/mixins-named-args`.
|
|
44
|
+
- `d6b20eee` variadic default forwarding regression is intentionally out of
|
|
45
|
+
scope for alpha.1. The current alpha wrapper renders an unset forwarded rest
|
|
46
|
+
argument as an empty value rather than falling through to the callee default.
|
|
47
|
+
- `1ee86aa3` CSS-var math regression: ported in `tests-unit/math-css-vars` with
|
|
48
|
+
Less 5 alpha expected output. Upstream's Less 4 `percentage(var(--x))` error
|
|
49
|
+
fixture is not active locally because the alpha wrapper currently leaves that
|
|
50
|
+
call for browser runtime CSS.
|
|
51
|
+
|
|
52
|
+
Package metadata, release notes, lockfile churn, and Less 4 parser/runtime
|
|
53
|
+
source changes from upstream/master are intentionally out of scope for this
|
|
54
|
+
alpha fixture sync.
|
package/package.json
CHANGED
|
@@ -3,12 +3,15 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "
|
|
6
|
+
"version": "5.0.0-alpha.1",
|
|
7
7
|
"description": "Less files and CSS results",
|
|
8
8
|
"author": "Alexis Sellier <self@cloudhead.net>",
|
|
9
9
|
"contributors": [
|
|
10
10
|
"The Core Less Team"
|
|
11
11
|
],
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/less/less.js/issues"
|
|
14
|
+
},
|
|
12
15
|
"license": "Apache-2.0",
|
|
13
16
|
"repository": {
|
|
14
17
|
"type": "git",
|
package/styles.config.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Top-level default config for the Less.js fixture corpus.
|
|
3
|
+
*
|
|
4
|
+
* Provides the flat-output default (`collapseNesting: true`) that the Jess
|
|
5
|
+
* all-less harness applies as the base of the config cascade, so it no longer
|
|
6
|
+
* has to hardcode that default. Fixture-directory `styles.config.*` files
|
|
7
|
+
* (nearest ancestor, resolved via cosmiconfig walk-up) override this per
|
|
8
|
+
* directory; anything without an explicit `collapseNesting` inherits this flat
|
|
9
|
+
* default.
|
|
10
|
+
*/
|
|
11
|
+
export default {
|
|
12
|
+
output: {
|
|
13
|
+
collapseNesting: true
|
|
14
|
+
}
|
|
15
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
SyntaxError: JavaScript evaluation error: 'TypeError: Cannot read
|
|
1
|
+
SyntaxError: JavaScript evaluation error: 'TypeError: Cannot read property 'toJS' of undefined' in {path}js-type-error.less on line 2, column 8:
|
|
2
2
|
1 .scope {
|
|
3
3
|
2 var: `this.foo.toJS`;
|
|
4
4
|
3 }
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.another-navbar {
|
|
23
|
-
@colors: #theme.dark.navbar.colors() !important;
|
|
24
|
-
background: @colors[primary];
|
|
25
|
-
border: 1px solid @colors[secondary];
|
|
23
|
+
@theme-colors: #theme.dark.navbar.colors() !important;
|
|
24
|
+
background: @theme-colors[primary];
|
|
25
|
+
border: 1px solid @theme-colors[secondary];
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.another {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* Less 4.x output, recorded when this fixture graduated to v5.
|
|
2
|
+
Historical record only — no test reads this file. */
|
|
3
|
+
|
|
4
|
+
.imported {
|
|
5
|
+
background: green;
|
|
6
|
+
}
|
|
7
|
+
@media (max-width: 768px) {
|
|
8
|
+
.mobile {
|
|
9
|
+
color: red;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
.container .nested {
|
|
13
|
+
color: blue;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Invalid ampersand merge template ".fruit-quoted-&" with parent selector "apple,satsuma,banana,pear"
|
|
@@ -43,41 +43,3 @@
|
|
|
43
43
|
color: red;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
@media only screen and (max-width: 300px) {
|
|
47
|
-
.lookup-media {
|
|
48
|
-
width: 240px;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
@keyframes shrinker {
|
|
52
|
-
from {
|
|
53
|
-
font-size: 15px;
|
|
54
|
-
}
|
|
55
|
-
to {
|
|
56
|
-
font-size: 12px;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
@supports (display: grid) {
|
|
60
|
-
.lookup-supports {
|
|
61
|
-
display: grid;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
@layer overrides {
|
|
65
|
-
.lookup-layered {
|
|
66
|
-
color: blue;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
@media (min-width: 900px) {
|
|
70
|
-
.lookup-chained {
|
|
71
|
-
width: 900px;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
@supports (width: 500px) {
|
|
75
|
-
.lookup-value-position {
|
|
76
|
-
width: 500px;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
@supports (width: 900px) {
|
|
80
|
-
.lookup-value-position-chained {
|
|
81
|
-
width: 900px;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
@@ -74,73 +74,3 @@
|
|
|
74
74
|
color: red;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
// --- bare `[...]` lookups in the same structural positions ---
|
|
79
|
-
// A lookup parses into a NamespaceValue rather than a Variable. These were
|
|
80
|
-
// silently exempt from the deprecation until the node-type test was widened,
|
|
81
|
-
// so every position is covered explicitly here.
|
|
82
|
-
@lookup: {
|
|
83
|
-
query: ~"only screen and (max-width: 300px)";
|
|
84
|
-
anim: shrinker;
|
|
85
|
-
supported: ~"(display: grid)";
|
|
86
|
-
layer-name: overrides;
|
|
87
|
-
@deep: {
|
|
88
|
-
query: ~"(min-width: 900px)";
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
@media @lookup[query] {
|
|
93
|
-
.lookup-media {
|
|
94
|
-
width: 240px;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
@keyframes @lookup[anim] {
|
|
99
|
-
from { font-size: 15px; }
|
|
100
|
-
to { font-size: 12px; }
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
@supports @lookup[supported] {
|
|
104
|
-
.lookup-supports {
|
|
105
|
-
display: grid;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
@layer @lookup[layer-name] {
|
|
110
|
-
.lookup-layered {
|
|
111
|
-
color: blue;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
// chained lookup — still one deprecation, not one per segment
|
|
116
|
-
@media @lookup[@deep][query] {
|
|
117
|
-
.lookup-chained {
|
|
118
|
-
width: 900px;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// A lookup in a declaration value inside `(...)` stays a value position and is
|
|
123
|
-
// not deprecated, mirroring the `@disp` case above.
|
|
124
|
-
//
|
|
125
|
-
// `@supports` scans its prelude as text, so a bare lookup reaches the permissive
|
|
126
|
-
// regex rather than being parsed structurally. Matching only `@values` used to
|
|
127
|
-
// resolve it to the whole ruleset and leave `[size]` behind, rendering
|
|
128
|
-
// `(width: [size])`. Both the flat and chained forms are covered here.
|
|
129
|
-
@values: {
|
|
130
|
-
size: 500px;
|
|
131
|
-
@deep: {
|
|
132
|
-
size: 900px;
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
@supports (width: @values[size]) {
|
|
137
|
-
.lookup-value-position {
|
|
138
|
-
width: 500px;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
@supports (width: @values[@deep][size]) {
|
|
143
|
-
.lookup-value-position-chained {
|
|
144
|
-
width: 900px;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
@@ -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
|
-
|
|
86
|
-
|
|
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
|
-
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
.wrapper {
|
|
99
|
+
@media (max-width: 600px) {
|
|
100
|
+
.mobile-only {
|
|
101
|
+
display: block;
|
|
102
|
+
}
|
|
101
103
|
}
|
|
102
104
|
}
|
|
103
105
|
@media (min-width: 1024px) {
|