-
Notifications
You must be signed in to change notification settings - Fork 3.4k
/
Copy pathimport-reference-issues.less
53 lines (46 loc) · 2.25 KB
/
import-reference-issues.less
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Tests following past issues:
// * #1851 - Extend within (reference) imported files
// * #1896 - Namespace imported less code does not get properly referenced, when there's a (reference) keyword.
// * #1878 - extend inside referenced file should not extend outside selectors
// * #2716 - A file imported by reference and then normally - multiple imports should be independent
// * #1968 - When using an @import (reference), mixins that contain an & selector get added to the compiled output improperly
// * #2162 - Cannot put import by reference inside of a mixin (also doubles #1896)
// * #2991 - Empty @media queries generated through line comments when compiling less file with (reference)
// #1878: extend inside referenced file should not extend outside selectors
@import (reference) "import-reference-issues/global-scope-import.less";
.theOnlySelector {
shall-have: one selector;
}
// #2716: A file imported by reference and then normally - multiple imports should be independent
// #1878: - double nested version
#do-not-show-import {
@import (reference, multiple) "import-reference-issues/multiple-import.less";
}
show-all-content {
@import (multiple) "import-reference-issues/multiple-import.less";
}
// #1896: Namespace imported less code does not get properly referenced, when there's a (reference) keyword.
#Namespace {
@import (less, reference) "import-reference-issues/simple-mixin.css";
}
#used-namespaced-mixin {
#Namespace > .mixin();
shall-see: another property above;
}
// #1851: Extend within (reference) imported files
// test-b is in global-scope-import.less file
.test-rule-c {
&:extend(.test-rule-b all);
}
// #1968: When using an @import (reference), mixins that contain an & selector get added to the compiled output improperly
@import "import-reference-issues/mixin-1968.less";
@import (reference) "import-reference-issues/appender-reference-1968.less";
// #2162 - Cannot put import by reference inside of a mixin (also doubles #1896)
.mixin-with-import-by-reference-inside() {
the-only-property: nothing-below-this;
@import (reference) "import-reference-issues/simple-ruleset-2162.less";
}
call-mixin-with-import-by-reference-inside {
.mixin-with-import-by-reference-inside();
}
@import (reference) "import-reference-issues/comments-2991.less";