diff options
author | Volpeon <git@volpeon.ink> | 2022-02-05 07:52:13 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2022-02-05 07:52:13 +0100 |
commit | dd5f3c463fab336d694f426dcad11a1783590fc9 (patch) | |
tree | faebf738a9556eaa393371852ed86550d4adf66a /test/bem | |
parent | Fix errors from transition from node-sass to sass (diff) | |
download | iro-sass-dd5f3c463fab336d694f426dcad11a1783590fc9.tar.gz iro-sass-dd5f3c463fab336d694f426dcad11a1783590fc9.tar.bz2 iro-sass-dd5f3c463fab336d694f426dcad11a1783590fc9.zip |
Ported from import syntax to modules
Diffstat (limited to 'test/bem')
-rw-r--r-- | test/bem/_at-theme.scss (renamed from test/bem/_iro-bem-at-theme.scss) | 15 | ||||
-rw-r--r-- | test/bem/_block.scss (renamed from test/bem/_iro-bem-block.scss) | 21 | ||||
-rw-r--r-- | test/bem/_composed-of.scss (renamed from test/bem/_iro-bem-composed-of.scss) | 43 | ||||
-rw-r--r-- | test/bem/_element.scss (renamed from test/bem/_iro-bem-element.scss) | 123 | ||||
-rw-r--r-- | test/bem/_examples.scss | 43 | ||||
-rw-r--r-- | test/bem/_modifier.scss (renamed from test/bem/_iro-bem-modifier.scss) | 249 | ||||
-rw-r--r-- | test/bem/_multi.scss (renamed from test/bem/_iro-bem-multi.scss) | 127 | ||||
-rw-r--r-- | test/bem/_next-twin-element.scss (renamed from test/bem/_iro-bem-next-twin-element.scss) | 49 | ||||
-rw-r--r-- | test/bem/_related-element.scss (renamed from test/bem/_iro-bem-related-element.scss) | 125 | ||||
-rw-r--r-- | test/bem/_state.scss (renamed from test/bem/_iro-bem-state.scss) | 49 | ||||
-rw-r--r-- | test/bem/_suffix.scss (renamed from test/bem/_iro-bem-suffix.scss) | 33 |
11 files changed, 454 insertions, 423 deletions
diff --git a/test/bem/_iro-bem-at-theme.scss b/test/bem/_at-theme.scss index d2d0696..29a4eba 100644 --- a/test/bem/_iro-bem-at-theme.scss +++ b/test/bem/_at-theme.scss | |||
@@ -1,16 +1,19 @@ | |||
1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations | 1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations |
2 | 2 | ||
3 | @use 'true' as *; | ||
4 | @use '../../src/bem'; | ||
5 | |||
3 | // | 6 | // |
4 | // Included test cases: | 7 | // Included test cases: |
5 | // - /// 1 /// - single theme | 8 | // - /// 1 /// - single theme |
6 | // - /// 2 /// - with sub-theme | 9 | // - /// 2 /// - with sub-theme |
7 | // | 10 | // |
8 | 11 | ||
9 | @include it('iro-bem-at-theme') { | 12 | @include it('at-theme') { |
10 | @include assert('single theme') { /// 1 /// | 13 | @include assert('single theme') { /// 1 /// |
11 | @include output(false) { | 14 | @include output(false) { |
12 | @include iro-bem-block('something') { | 15 | @include bem.block('something') { |
13 | @include iro-bem-at-theme('theme') { | 16 | @include bem.at-theme('theme') { |
14 | font-size: 2em; | 17 | font-size: 2em; |
15 | } | 18 | } |
16 | } | 19 | } |
@@ -27,12 +30,12 @@ | |||
27 | 30 | ||
28 | @include assert('with sub-theme') { /// 2 /// | 31 | @include assert('with sub-theme') { /// 2 /// |
29 | @include output(false) { | 32 | @include output(false) { |
30 | @include iro-bem-block('something') { | 33 | @include bem.block('something') { |
31 | @include iro-bem-at-theme('theme') { | 34 | @include bem.at-theme('theme') { |
32 | font-size: 2em; | 35 | font-size: 2em; |
33 | } | 36 | } |
34 | 37 | ||
35 | @include iro-bem-at-theme('theme', 'subtheme') { | 38 | @include bem.at-theme('theme', 'subtheme') { |
36 | font-size: 3em; | 39 | font-size: 3em; |
37 | } | 40 | } |
38 | } | 41 | } |
diff --git a/test/bem/_iro-bem-block.scss b/test/bem/_block.scss index a93d803..fb3a545 100644 --- a/test/bem/_iro-bem-block.scss +++ b/test/bem/_block.scss | |||
@@ -1,5 +1,8 @@ | |||
1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations | 1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations |
2 | 2 | ||
3 | @use 'true' as *; | ||
4 | @use '../../src/bem'; | ||
5 | |||
3 | // | 6 | // |
4 | // Included test cases: | 7 | // Included test cases: |
5 | // - /// 1 /// - without namespace | 8 | // - /// 1 /// - without namespace |
@@ -8,10 +11,10 @@ | |||
8 | // - /// 4 /// - within selector | 11 | // - /// 4 /// - within selector |
9 | // | 12 | // |
10 | 13 | ||
11 | @include it('iro-bem-block') { | 14 | @include it('block') { |
12 | @include assert('without namespace') { /// 1 /// | 15 | @include assert('without namespace') { /// 1 /// |
13 | @include output(false) { | 16 | @include output(false) { |
14 | @include iro-bem-block('something') { | 17 | @include bem.block('something') { |
15 | font-size: 1em; | 18 | font-size: 1em; |
16 | } | 19 | } |
17 | } | 20 | } |
@@ -23,17 +26,17 @@ | |||
23 | } | 26 | } |
24 | } | 27 | } |
25 | 28 | ||
26 | @each $ns in map-keys($iro-bem-namespaces) { | 29 | @each $ns in map-keys(bem.$namespaces) { |
27 | @include assert('with namespace "#{$ns}"') { /// 2 /// | 30 | @include assert('with namespace "#{$ns}"') { /// 2 /// |
28 | @include output(false) { | 31 | @include output(false) { |
29 | @include iro-bem-block('something', $ns) { | 32 | @include bem.block('something', $ns) { |
30 | font-size: 1em; | 33 | font-size: 1em; |
31 | } | 34 | } |
32 | } | 35 | } |
33 | 36 | ||
34 | @include expect(false) { | 37 | @include expect(false) { |
35 | @if $ns != 'theme' { | 38 | @if $ns != 'theme' { |
36 | .#{map-get($iro-bem-namespaces, $ns)}-something { | 39 | .#{map-get(bem.$namespaces, $ns)}-something { |
37 | font-size: 1em; | 40 | font-size: 1em; |
38 | } | 41 | } |
39 | } @else { | 42 | } @else { |
@@ -49,9 +52,9 @@ | |||
49 | 52 | ||
50 | @include assert('nested') { /// 3 /// | 53 | @include assert('nested') { /// 3 /// |
51 | @include output(false) { | 54 | @include output(false) { |
52 | @include iro-bem-theme('theme') { | 55 | @include bem.theme('theme') { |
53 | @include iro-bem-theme('subtheme') { | 56 | @include bem.theme('subtheme') { |
54 | @include iro-bem-block('something') { | 57 | @include bem.block('something') { |
55 | font-size: 2em; | 58 | font-size: 2em; |
56 | } | 59 | } |
57 | } | 60 | } |
@@ -70,7 +73,7 @@ | |||
70 | @include assert('within selector') { /// 4 /// | 73 | @include assert('within selector') { /// 4 /// |
71 | @include output(false) { | 74 | @include output(false) { |
72 | .sel { | 75 | .sel { |
73 | @include iro-bem-block('something') { | 76 | @include bem.block('something') { |
74 | font-size: 2em; | 77 | font-size: 2em; |
75 | } | 78 | } |
76 | } | 79 | } |
diff --git a/test/bem/_iro-bem-composed-of.scss b/test/bem/_composed-of.scss index e724eb8..fcbf2c4 100644 --- a/test/bem/_iro-bem-composed-of.scss +++ b/test/bem/_composed-of.scss | |||
@@ -1,5 +1,8 @@ | |||
1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations | 1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations |
2 | 2 | ||
3 | @use 'true' as *; | ||
4 | @use '../../src/bem'; | ||
5 | |||
3 | // | 6 | // |
4 | // Included test cases: | 7 | // Included test cases: |
5 | // - /// 1 /// - without namespace, single | 8 | // - /// 1 /// - without namespace, single |
@@ -8,15 +11,15 @@ | |||
8 | // - /// 4 /// - with namespace, multiple | 11 | // - /// 4 /// - with namespace, multiple |
9 | // | 12 | // |
10 | 13 | ||
11 | @include it('iro-bem-composed-of') { | 14 | @include it('composed-of') { |
12 | @include assert('without namespace, single') { /// 1 /// | 15 | @include assert('without namespace, single') { /// 1 /// |
13 | @include output(false) { | 16 | @include output(false) { |
14 | @include iro-bem-block('something') { | 17 | @include bem.block('something') { |
15 | font-size: 1em; | 18 | font-size: 1em; |
16 | } | 19 | } |
17 | 20 | ||
18 | @include iro-bem-block('another') { | 21 | @include bem.block('another') { |
19 | @include iro-bem-composed-of('something'); | 22 | @include bem.composed-of('something'); |
20 | 23 | ||
21 | font-size: 2em; | 24 | font-size: 2em; |
22 | } | 25 | } |
@@ -33,15 +36,15 @@ | |||
33 | } | 36 | } |
34 | } | 37 | } |
35 | 38 | ||
36 | @each $ns in map-keys($iro-bem-namespaces) { | 39 | @each $ns in map-keys(bem.$namespaces) { |
37 | @include assert('with namespace "#{$ns}", single') { /// 2 /// | 40 | @include assert('with namespace "#{$ns}", single') { /// 2 /// |
38 | @include output(false) { | 41 | @include output(false) { |
39 | @include iro-bem-block('something', $ns) { | 42 | @include bem.block('something', $ns) { |
40 | font-size: 1em; | 43 | font-size: 1em; |
41 | } | 44 | } |
42 | 45 | ||
43 | @include iro-bem-block('another') { | 46 | @include bem.block('another') { |
44 | @include iro-bem-composed-of('something' $ns); | 47 | @include bem.composed-of('something' $ns); |
45 | 48 | ||
46 | font-size: 2em; | 49 | font-size: 2em; |
47 | } | 50 | } |
@@ -49,7 +52,7 @@ | |||
49 | 52 | ||
50 | @include expect(false) { | 53 | @include expect(false) { |
51 | @if $ns != 'theme' { | 54 | @if $ns != 'theme' { |
52 | .#{map-get($iro-bem-namespaces, $ns)}-something { | 55 | .#{map-get(bem.$namespaces, $ns)}-something { |
53 | font-size: 1em; | 56 | font-size: 1em; |
54 | } | 57 | } |
55 | } @else { | 58 | } @else { |
@@ -69,16 +72,16 @@ | |||
69 | 72 | ||
70 | @include assert('without namespace, multiple') { /// 3 /// | 73 | @include assert('without namespace, multiple') { /// 3 /// |
71 | @include output(false) { | 74 | @include output(false) { |
72 | @include iro-bem-block('something') { | 75 | @include bem.block('something') { |
73 | font-size: 1em; | 76 | font-size: 1em; |
74 | } | 77 | } |
75 | 78 | ||
76 | @include iro-bem-block('somethingElse') { | 79 | @include bem.block('somethingElse') { |
77 | font-size: 1em; | 80 | font-size: 1em; |
78 | } | 81 | } |
79 | 82 | ||
80 | @include iro-bem-block('another') { | 83 | @include bem.block('another') { |
81 | @include iro-bem-composed-of('something', 'somethingElse'); | 84 | @include bem.composed-of('something', 'somethingElse'); |
82 | 85 | ||
83 | font-size: 2em; | 86 | font-size: 2em; |
84 | } | 87 | } |
@@ -99,19 +102,19 @@ | |||
99 | } | 102 | } |
100 | } | 103 | } |
101 | 104 | ||
102 | @each $ns in map-keys($iro-bem-namespaces) { | 105 | @each $ns in map-keys(bem.$namespaces) { |
103 | @include assert('with namespace "#{$ns}", multiple') { /// 4 /// | 106 | @include assert('with namespace "#{$ns}", multiple') { /// 4 /// |
104 | @include output(false) { | 107 | @include output(false) { |
105 | @include iro-bem-block('something', $ns) { | 108 | @include bem.block('something', $ns) { |
106 | font-size: 1em; | 109 | font-size: 1em; |
107 | } | 110 | } |
108 | 111 | ||
109 | @include iro-bem-block('somethingElse', $ns) { | 112 | @include bem.block('somethingElse', $ns) { |
110 | font-size: 1em; | 113 | font-size: 1em; |
111 | } | 114 | } |
112 | 115 | ||
113 | @include iro-bem-block('another') { | 116 | @include bem.block('another') { |
114 | @include iro-bem-composed-of('something' $ns, 'somethingElse' $ns); | 117 | @include bem.composed-of('something' $ns, 'somethingElse' $ns); |
115 | 118 | ||
116 | font-size: 2em; | 119 | font-size: 2em; |
117 | } | 120 | } |
@@ -119,11 +122,11 @@ | |||
119 | 122 | ||
120 | @include expect(false) { | 123 | @include expect(false) { |
121 | @if $ns != 'theme' { | 124 | @if $ns != 'theme' { |
122 | .#{map-get($iro-bem-namespaces, $ns)}-something { | 125 | .#{map-get(bem.$namespaces, $ns)}-something { |
123 | font-size: 1em; | 126 | font-size: 1em; |
124 | } | 127 | } |
125 | 128 | ||
126 | .#{map-get($iro-bem-namespaces, $ns)}-somethingElse { | 129 | .#{map-get(bem.$namespaces, $ns)}-somethingElse { |
127 | font-size: 1em; | 130 | font-size: 1em; |
128 | } | 131 | } |
129 | } @else { | 132 | } @else { |
diff --git a/test/bem/_iro-bem-element.scss b/test/bem/_element.scss index f69f133..c8839de 100644 --- a/test/bem/_iro-bem-element.scss +++ b/test/bem/_element.scss | |||
@@ -1,5 +1,8 @@ | |||
1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations | 1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations |
2 | 2 | ||
3 | @use 'true' as *; | ||
4 | @use '../../src/bem'; | ||
5 | |||
3 | // | 6 | // |
4 | // Included test cases: | 7 | // Included test cases: |
5 | // - /// 1 /// - single element | 8 | // - /// 1 /// - single element |
@@ -18,11 +21,11 @@ | |||
18 | // - /// 14 /// - single element, in at-theme | 21 | // - /// 14 /// - single element, in at-theme |
19 | // | 22 | // |
20 | 23 | ||
21 | @include it('iro-bem-element') { | 24 | @include it('element') { |
22 | @include assert('single element') { /// 1 /// | 25 | @include assert('single element') { /// 1 /// |
23 | @include output { | 26 | @include output { |
24 | @include iro-bem-block('something') { | 27 | @include bem.block('something') { |
25 | @include iro-bem-element('child') { | 28 | @include bem.elem('child') { |
26 | font-size: 2em; | 29 | font-size: 2em; |
27 | } | 30 | } |
28 | } | 31 | } |
@@ -37,15 +40,15 @@ | |||
37 | 40 | ||
38 | @include assert('single element, manual selector in-between') { /// 2 /// | 41 | @include assert('single element, manual selector in-between') { /// 2 /// |
39 | @include output(false) { | 42 | @include output(false) { |
40 | @include iro-bem-block('something') { | 43 | @include bem.block('something') { |
41 | &:hover { | 44 | &:hover { |
42 | @include iro-bem-element('child1') { | 45 | @include bem.elem('child1') { |
43 | font-size: 2em; | 46 | font-size: 2em; |
44 | } | 47 | } |
45 | } | 48 | } |
46 | 49 | ||
47 | .test & { | 50 | .test & { |
48 | @include iro-bem-element('child2') { | 51 | @include bem.elem('child2') { |
49 | font-size: 2em; | 52 | font-size: 2em; |
50 | } | 53 | } |
51 | } | 54 | } |
@@ -65,9 +68,9 @@ | |||
65 | 68 | ||
66 | @include assert('single element, modifier in-between') { /// 3 /// | 69 | @include assert('single element, modifier in-between') { /// 3 /// |
67 | @include output { | 70 | @include output { |
68 | @include iro-bem-block('something') { | 71 | @include bem.block('something') { |
69 | @include iro-bem-modifier('mod') { | 72 | @include bem.modifier('mod') { |
70 | @include iro-bem-element('child') { | 73 | @include bem.elem('child') { |
71 | font-size: 2em; | 74 | font-size: 2em; |
72 | } | 75 | } |
73 | } | 76 | } |
@@ -83,11 +86,11 @@ | |||
83 | 86 | ||
84 | @include assert('single element, nested') { /// 4 /// | 87 | @include assert('single element, nested') { /// 4 /// |
85 | @include output { | 88 | @include output { |
86 | @include iro-bem-block('something') { | 89 | @include bem.block('something') { |
87 | @include iro-bem-element('child') { | 90 | @include bem.elem('child') { |
88 | font-size: 2em; | 91 | font-size: 2em; |
89 | 92 | ||
90 | @include iro-bem-element('subchild') { | 93 | @include bem.elem('subchild') { |
91 | font-size: 3em; | 94 | font-size: 3em; |
92 | } | 95 | } |
93 | } | 96 | } |
@@ -107,38 +110,38 @@ | |||
107 | 110 | ||
108 | @include assert('single element, nested, manual selector in-between') { /// 5 /// | 111 | @include assert('single element, nested, manual selector in-between') { /// 5 /// |
109 | @include output(false) { | 112 | @include output(false) { |
110 | @include iro-bem-block('something') { | 113 | @include bem.block('something') { |
111 | &:hover { | 114 | &:hover { |
112 | @include iro-bem-element('child1') { | 115 | @include bem.elem('child1') { |
113 | font-size: 2em; | 116 | font-size: 2em; |
114 | 117 | ||
115 | @include iro-bem-element('subchild1') { | 118 | @include bem.elem('subchild1') { |
116 | font-size: 3em; | 119 | font-size: 3em; |
117 | } | 120 | } |
118 | } | 121 | } |
119 | } | 122 | } |
120 | 123 | ||
121 | .test & { | 124 | .test & { |
122 | @include iro-bem-element('child2') { | 125 | @include bem.elem('child2') { |
123 | font-size: 2em; | 126 | font-size: 2em; |
124 | 127 | ||
125 | @include iro-bem-element('subchild2') { | 128 | @include bem.elem('subchild2') { |
126 | font-size: 3em; | 129 | font-size: 3em; |
127 | } | 130 | } |
128 | } | 131 | } |
129 | } | 132 | } |
130 | 133 | ||
131 | @include iro-bem-element('child3') { | 134 | @include bem.elem('child3') { |
132 | font-size: 2em; | 135 | font-size: 2em; |
133 | 136 | ||
134 | &:hover { | 137 | &:hover { |
135 | @include iro-bem-element('subchild3') { | 138 | @include bem.elem('subchild3') { |
136 | font-size: 3em; | 139 | font-size: 3em; |
137 | } | 140 | } |
138 | } | 141 | } |
139 | 142 | ||
140 | .test & { | 143 | .test & { |
141 | @include iro-bem-element('subchild4') { | 144 | @include bem.elem('subchild4') { |
142 | font-size: 3em; | 145 | font-size: 3em; |
143 | } | 146 | } |
144 | } | 147 | } |
@@ -179,22 +182,22 @@ | |||
179 | 182 | ||
180 | @include assert('single element, nested, modifier in-between') { /// 6 /// | 183 | @include assert('single element, nested, modifier in-between') { /// 6 /// |
181 | @include output { | 184 | @include output { |
182 | @include iro-bem-block('something') { | 185 | @include bem.block('something') { |
183 | @include iro-bem-modifier('mod') { | 186 | @include bem.modifier('mod') { |
184 | @include iro-bem-element('child') { | 187 | @include bem.elem('child') { |
185 | font-size: 2em; | 188 | font-size: 2em; |
186 | 189 | ||
187 | @include iro-bem-element('subchild') { | 190 | @include bem.elem('subchild') { |
188 | font-size: 3em; | 191 | font-size: 3em; |
189 | } | 192 | } |
190 | } | 193 | } |
191 | } | 194 | } |
192 | 195 | ||
193 | @include iro-bem-element('child') { | 196 | @include bem.elem('child') { |
194 | font-size: 2em; | 197 | font-size: 2em; |
195 | 198 | ||
196 | @include iro-bem-modifier('mod') { | 199 | @include bem.modifier('mod') { |
197 | @include iro-bem-element('subchild') { | 200 | @include bem.elem('subchild') { |
198 | font-size: 3em; | 201 | font-size: 3em; |
199 | } | 202 | } |
200 | } | 203 | } |
@@ -223,9 +226,9 @@ | |||
223 | 226 | ||
224 | @include assert('single element, in at-theme') { /// 7 /// | 227 | @include assert('single element, in at-theme') { /// 7 /// |
225 | @include output(false) { | 228 | @include output(false) { |
226 | @include iro-bem-block('something') { | 229 | @include bem.block('something') { |
227 | @include iro-bem-at-theme('dark') { | 230 | @include bem.at-theme('dark') { |
228 | @include iro-bem-element('child') { | 231 | @include bem.elem('child') { |
229 | font-size: 2em; | 232 | font-size: 2em; |
230 | } | 233 | } |
231 | } | 234 | } |
@@ -243,8 +246,8 @@ | |||
243 | 246 | ||
244 | @include assert('multiple elements') { /// 8 /// | 247 | @include assert('multiple elements') { /// 8 /// |
245 | @include output { | 248 | @include output { |
246 | @include iro-bem-block('something') { | 249 | @include bem.block('something') { |
247 | @include iro-bem-element('child1', 'child2') { | 250 | @include bem.elem('child1', 'child2') { |
248 | font-size: 2em; | 251 | font-size: 2em; |
249 | } | 252 | } |
250 | } | 253 | } |
@@ -260,15 +263,15 @@ | |||
260 | 263 | ||
261 | @include assert('multiple elements, manual selector in-between') { /// 9 /// | 264 | @include assert('multiple elements, manual selector in-between') { /// 9 /// |
262 | @include output(false) { | 265 | @include output(false) { |
263 | @include iro-bem-block('something') { | 266 | @include bem.block('something') { |
264 | &:hover { | 267 | &:hover { |
265 | @include iro-bem-element('child1', 'child2') { | 268 | @include bem.elem('child1', 'child2') { |
266 | font-size: 2em; | 269 | font-size: 2em; |
267 | } | 270 | } |
268 | } | 271 | } |
269 | 272 | ||
270 | .test & { | 273 | .test & { |
271 | @include iro-bem-element('child3', 'child4') { | 274 | @include bem.elem('child3', 'child4') { |
272 | font-size: 2em; | 275 | font-size: 2em; |
273 | } | 276 | } |
274 | } | 277 | } |
@@ -290,9 +293,9 @@ | |||
290 | 293 | ||
291 | @include assert('multiple elements, modifier in-between') { /// 10 /// | 294 | @include assert('multiple elements, modifier in-between') { /// 10 /// |
292 | @include output { | 295 | @include output { |
293 | @include iro-bem-block('something') { | 296 | @include bem.block('something') { |
294 | @include iro-bem-modifier('mod') { | 297 | @include bem.modifier('mod') { |
295 | @include iro-bem-element('child1', 'child2') { | 298 | @include bem.elem('child1', 'child2') { |
296 | font-size: 2em; | 299 | font-size: 2em; |
297 | } | 300 | } |
298 | } | 301 | } |
@@ -309,19 +312,19 @@ | |||
309 | 312 | ||
310 | @include assert('multiple elements, nested') { /// 11 /// | 313 | @include assert('multiple elements, nested') { /// 11 /// |
311 | @include output { | 314 | @include output { |
312 | @include iro-bem-block('something') { | 315 | @include bem.block('something') { |
313 | @include iro-bem-element('child1', 'child2') { | 316 | @include bem.elem('child1', 'child2') { |
314 | font-size: 2em; | 317 | font-size: 2em; |
315 | 318 | ||
316 | @include iro-bem-element('subchild1') { | 319 | @include bem.elem('subchild1') { |
317 | font-size: 3em; | 320 | font-size: 3em; |
318 | } | 321 | } |
319 | } | 322 | } |
320 | 323 | ||
321 | @include iro-bem-element('child3') { | 324 | @include bem.elem('child3') { |
322 | font-size: 2em; | 325 | font-size: 2em; |
323 | 326 | ||
324 | @include iro-bem-element('subchild2', 'subchild3') { | 327 | @include bem.elem('subchild2', 'subchild3') { |
325 | font-size: 3em; | 328 | font-size: 3em; |
326 | } | 329 | } |
327 | } | 330 | } |
@@ -352,34 +355,34 @@ | |||
352 | 355 | ||
353 | @include assert('multiple elements, nested, manual selector in-between') { /// 12 /// | 356 | @include assert('multiple elements, nested, manual selector in-between') { /// 12 /// |
354 | @include output(false) { | 357 | @include output(false) { |
355 | @include iro-bem-block('something') { | 358 | @include bem.block('something') { |
356 | @include iro-bem-element('child1', 'child2') { | 359 | @include bem.elem('child1', 'child2') { |
357 | font-size: 2em; | 360 | font-size: 2em; |
358 | 361 | ||
359 | &:hover { | 362 | &:hover { |
360 | @include iro-bem-element('subchild1') { | 363 | @include bem.elem('subchild1') { |
361 | font-size: 3em; | 364 | font-size: 3em; |
362 | } | 365 | } |
363 | } | 366 | } |
364 | 367 | ||
365 | .test & { | 368 | .test & { |
366 | @include iro-bem-element('subchild2') { | 369 | @include bem.elem('subchild2') { |
367 | font-size: 3em; | 370 | font-size: 3em; |
368 | } | 371 | } |
369 | } | 372 | } |
370 | } | 373 | } |
371 | 374 | ||
372 | @include iro-bem-element('child3') { | 375 | @include bem.elem('child3') { |
373 | font-size: 2em; | 376 | font-size: 2em; |
374 | 377 | ||
375 | &:hover { | 378 | &:hover { |
376 | @include iro-bem-element('subchild3', 'subchild4') { | 379 | @include bem.elem('subchild3', 'subchild4') { |
377 | font-size: 3em; | 380 | font-size: 3em; |
378 | } | 381 | } |
379 | } | 382 | } |
380 | 383 | ||
381 | .test & { | 384 | .test & { |
382 | @include iro-bem-element('subchild5', 'subchild6') { | 385 | @include bem.elem('subchild5', 'subchild6') { |
383 | font-size: 3em; | 386 | font-size: 3em; |
384 | } | 387 | } |
385 | } | 388 | } |
@@ -421,22 +424,22 @@ | |||
421 | 424 | ||
422 | @include assert('multiple elements, nested, modifier in-between') { /// 13 /// | 425 | @include assert('multiple elements, nested, modifier in-between') { /// 13 /// |
423 | @include output { | 426 | @include output { |
424 | @include iro-bem-block('something') { | 427 | @include bem.block('something') { |
425 | @include iro-bem-element('child1', 'child2') { | 428 | @include bem.elem('child1', 'child2') { |
426 | font-size: 2em; | 429 | font-size: 2em; |
427 | 430 | ||
428 | @include iro-bem-modifier('mod') { | 431 | @include bem.modifier('mod') { |
429 | @include iro-bem-element('subchild1') { | 432 | @include bem.elem('subchild1') { |
430 | font-size: 3em; | 433 | font-size: 3em; |
431 | } | 434 | } |
432 | } | 435 | } |
433 | } | 436 | } |
434 | 437 | ||
435 | @include iro-bem-element('child3') { | 438 | @include bem.elem('child3') { |
436 | font-size: 2em; | 439 | font-size: 2em; |
437 | 440 | ||
438 | @include iro-bem-modifier('mod') { | 441 | @include bem.modifier('mod') { |
439 | @include iro-bem-element('subchild2', 'subchild3') { | 442 | @include bem.elem('subchild2', 'subchild3') { |
440 | font-size: 3em; | 443 | font-size: 3em; |
441 | } | 444 | } |
442 | } | 445 | } |
@@ -468,9 +471,9 @@ | |||
468 | 471 | ||
469 | @include assert('multiple elements, in at-theme') { /// 14 /// | 472 | @include assert('multiple elements, in at-theme') { /// 14 /// |
470 | @include output(false) { | 473 | @include output(false) { |
471 | @include iro-bem-block('something') { | 474 | @include bem.block('something') { |
472 | @include iro-bem-at-theme('dark') { | 475 | @include bem.at-theme('dark') { |
473 | @include iro-bem-element('child1', 'child2') { | 476 | @include bem.elem('child1', 'child2') { |
474 | font-size: 2em; | 477 | font-size: 2em; |
475 | } | 478 | } |
476 | } | 479 | } |
diff --git a/test/bem/_examples.scss b/test/bem/_examples.scss index 243ee35..33deca0 100644 --- a/test/bem/_examples.scss +++ b/test/bem/_examples.scss | |||
@@ -1,5 +1,8 @@ | |||
1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations no-empty-rulesets | 1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations no-empty-rulesets |
2 | 2 | ||
3 | @use 'true' as *; | ||
4 | @use '../../src/bem'; | ||
5 | |||
3 | // | 6 | // |
4 | // Included test cases: | 7 | // Included test cases: |
5 | // - /// 1 /// - Media object | 8 | // - /// 1 /// - Media object |
@@ -10,30 +13,30 @@ | |||
10 | @include it('Examples') { | 13 | @include it('Examples') { |
11 | @include assert('Media object') { /// 1 /// | 14 | @include assert('Media object') { /// 1 /// |
12 | @include output { | 15 | @include output { |
13 | @include iro-bem-object('media') { | 16 | @include bem.object('media') { |
14 | display: flex; | 17 | display: flex; |
15 | align-items: flex-start; | 18 | align-items: flex-start; |
16 | justify-content: flex-start; | 19 | justify-content: flex-start; |
17 | 20 | ||
18 | @include iro-bem-element('image') { | 21 | @include bem.elem('image') { |
19 | display: block; | 22 | display: block; |
20 | flex: 0 0 auto; | 23 | flex: 0 0 auto; |
21 | order: 1; | 24 | order: 1; |
22 | overflow: hidden; | 25 | overflow: hidden; |
23 | } | 26 | } |
24 | 27 | ||
25 | @include iro-bem-element('body') { | 28 | @include bem.elem('body') { |
26 | order: 2; | 29 | order: 2; |
27 | } | 30 | } |
28 | 31 | ||
29 | @include iro-bem-modifier('rtl') { | 32 | @include bem.modifier('rtl') { |
30 | justify-content: flex-end; | 33 | justify-content: flex-end; |
31 | 34 | ||
32 | @include iro-bem-element('image') { | 35 | @include bem.elem('image') { |
33 | order: 2; | 36 | order: 2; |
34 | } | 37 | } |
35 | 38 | ||
36 | @include iro-bem-element('body') { | 39 | @include bem.elem('body') { |
37 | order: 1; | 40 | order: 1; |
38 | } | 41 | } |
39 | } | 42 | } |
@@ -74,30 +77,30 @@ | |||
74 | 77 | ||
75 | @include assert('Tabs') { /// 2 /// | 78 | @include assert('Tabs') { /// 2 /// |
76 | @include output { | 79 | @include output { |
77 | @include iro-bem-component('tabs') { | 80 | @include bem.component('tabs') { |
78 | position: relative; | 81 | position: relative; |
79 | 82 | ||
80 | @include iro-bem-element('tab') { | 83 | @include bem.elem('tab') { |
81 | float: left; | 84 | float: left; |
82 | } | 85 | } |
83 | 86 | ||
84 | @include iro-bem-element('tabRadio') { | 87 | @include bem.elem('tabRadio') { |
85 | position: absolute; | 88 | position: absolute; |
86 | top: -9999px; | 89 | top: -9999px; |
87 | left: -9999px; | 90 | left: -9999px; |
88 | 91 | ||
89 | &:checked { | 92 | &:checked { |
90 | @include iro-bem-sibling-element('tabLabel') { | 93 | @include bem.sibling-elem('tabLabel') { |
91 | font-weight: bold; | 94 | font-weight: bold; |
92 | } | 95 | } |
93 | 96 | ||
94 | @include iro-bem-sibling-element('tabContent') { | 97 | @include bem.sibling-elem('tabContent') { |
95 | display: block; | 98 | display: block; |
96 | } | 99 | } |
97 | } | 100 | } |
98 | } | 101 | } |
99 | 102 | ||
100 | @include iro-bem-element('tabLabel') { | 103 | @include bem.elem('tabLabel') { |
101 | cursor: pointer; | 104 | cursor: pointer; |
102 | 105 | ||
103 | &:hover, | 106 | &:hover, |
@@ -106,7 +109,7 @@ | |||
106 | } | 109 | } |
107 | } | 110 | } |
108 | 111 | ||
109 | @include iro-bem-element('tabContent') { | 112 | @include bem.elem('tabContent') { |
110 | position: absolute; | 113 | position: absolute; |
111 | left: 0; | 114 | left: 0; |
112 | display: none; | 115 | display: none; |
@@ -156,28 +159,28 @@ | |||
156 | 159 | ||
157 | @include assert('Accordion') { /// 3 /// | 160 | @include assert('Accordion') { /// 3 /// |
158 | @include output { | 161 | @include output { |
159 | @include iro-bem-component('accordion') { | 162 | @include bem.component('accordion') { |
160 | @include iro-bem-element('section') { | 163 | @include bem.elem('section') { |
161 | // nothing to do | 164 | // nothing to do |
162 | } | 165 | } |
163 | 166 | ||
164 | @include iro-bem-element('sectionCheckbox') { | 167 | @include bem.elem('sectionCheckbox') { |
165 | position: absolute; | 168 | position: absolute; |
166 | top: -9999px; | 169 | top: -9999px; |
167 | left: -9999px; | 170 | left: -9999px; |
168 | 171 | ||
169 | &:checked { | 172 | &:checked { |
170 | @include iro-bem-sibling-element('sectionLabel') { | 173 | @include bem.sibling-elem('sectionLabel') { |
171 | font-weight: bold; | 174 | font-weight: bold; |
172 | } | 175 | } |
173 | 176 | ||
174 | @include iro-bem-sibling-element('sectionContent') { | 177 | @include bem.sibling-elem('sectionContent') { |
175 | display: block; | 178 | display: block; |
176 | } | 179 | } |
177 | } | 180 | } |
178 | } | 181 | } |
179 | 182 | ||
180 | @include iro-bem-element('sectionLabel') { | 183 | @include bem.elem('sectionLabel') { |
181 | cursor: pointer; | 184 | cursor: pointer; |
182 | 185 | ||
183 | &:hover, | 186 | &:hover, |
@@ -186,7 +189,7 @@ | |||
186 | } | 189 | } |
187 | } | 190 | } |
188 | 191 | ||
189 | @include iro-bem-element('sectionContent') { | 192 | @include bem.elem('sectionContent') { |
190 | display: none; | 193 | display: none; |
191 | } | 194 | } |
192 | } | 195 | } |
diff --git a/test/bem/_iro-bem-modifier.scss b/test/bem/_modifier.scss index 60e2fe4..934efa3 100644 --- a/test/bem/_iro-bem-modifier.scss +++ b/test/bem/_modifier.scss | |||
@@ -1,5 +1,8 @@ | |||
1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations | 1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations |
2 | 2 | ||
3 | @use 'true' as *; | ||
4 | @use '../../src/bem'; | ||
5 | |||
3 | // | 6 | // |
4 | // Included test cases: | 7 | // Included test cases: |
5 | // - /// 1 /// - block modifier | 8 | // - /// 1 /// - block modifier |
@@ -19,14 +22,14 @@ | |||
19 | // - /// 15 /// - block and element modifiers, multiple elements | 22 | // - /// 15 /// - block and element modifiers, multiple elements |
20 | // | 23 | // |
21 | 24 | ||
22 | @include it('iro-bem-modifier') { | 25 | @include it('modifier') { |
23 | @include assert('block modifier') { /// 1 /// | 26 | @include assert('block modifier') { /// 1 /// |
24 | @include output { | 27 | @include output { |
25 | @include iro-bem-block('something') { | 28 | @include bem.block('something') { |
26 | @include iro-bem-modifier('mod') { | 29 | @include bem.modifier('mod') { |
27 | font-size: 1.5em; | 30 | font-size: 1.5em; |
28 | 31 | ||
29 | @include iro-bem-modifier('submod') { | 32 | @include bem.modifier('submod') { |
30 | font-size: 1.75em; | 33 | font-size: 1.75em; |
31 | } | 34 | } |
32 | } | 35 | } |
@@ -46,12 +49,12 @@ | |||
46 | 49 | ||
47 | @include assert('block modifier, in at-theme') { /// 2 /// | 50 | @include assert('block modifier, in at-theme') { /// 2 /// |
48 | @include output(false) { | 51 | @include output(false) { |
49 | @include iro-bem-block('something') { | 52 | @include bem.block('something') { |
50 | @include iro-bem-at-theme('dark') { | 53 | @include bem.at-theme('dark') { |
51 | @include iro-bem-modifier('mod') { | 54 | @include bem.modifier('mod') { |
52 | font-size: 1.5em; | 55 | font-size: 1.5em; |
53 | 56 | ||
54 | @include iro-bem-modifier('submod') { | 57 | @include bem.modifier('submod') { |
55 | font-size: 1.75em; | 58 | font-size: 1.75em; |
56 | } | 59 | } |
57 | } | 60 | } |
@@ -76,12 +79,12 @@ | |||
76 | 79 | ||
77 | @include assert('element modifier, single element') { /// 3 /// | 80 | @include assert('element modifier, single element') { /// 3 /// |
78 | @include output { | 81 | @include output { |
79 | @include iro-bem-block('something') { | 82 | @include bem.block('something') { |
80 | @include iro-bem-element('child') { | 83 | @include bem.elem('child') { |
81 | @include iro-bem-modifier('mod') { | 84 | @include bem.modifier('mod') { |
82 | font-size: 2.5em; | 85 | font-size: 2.5em; |
83 | 86 | ||
84 | @include iro-bem-modifier('submod') { | 87 | @include bem.modifier('submod') { |
85 | font-size: 2.75em; | 88 | font-size: 2.75em; |
86 | } | 89 | } |
87 | } | 90 | } |
@@ -102,12 +105,12 @@ | |||
102 | 105 | ||
103 | @include assert('element modifier, multiple elements') { /// 4 /// | 106 | @include assert('element modifier, multiple elements') { /// 4 /// |
104 | @include output { | 107 | @include output { |
105 | @include iro-bem-block('something') { | 108 | @include bem.block('something') { |
106 | @include iro-bem-element('child1', 'child2') { | 109 | @include bem.elem('child1', 'child2') { |
107 | @include iro-bem-modifier('mod') { | 110 | @include bem.modifier('mod') { |
108 | font-size: 2.5em; | 111 | font-size: 2.5em; |
109 | 112 | ||
110 | @include iro-bem-modifier('submod') { | 113 | @include bem.modifier('submod') { |
111 | font-size: 2.75em; | 114 | font-size: 2.75em; |
112 | } | 115 | } |
113 | } | 116 | } |
@@ -130,13 +133,13 @@ | |||
130 | 133 | ||
131 | @include assert('element modifier, single related element') { /// 5 /// | 134 | @include assert('element modifier, single related element') { /// 5 /// |
132 | @include output { | 135 | @include output { |
133 | @include iro-bem-block('something') { | 136 | @include bem.block('something') { |
134 | @include iro-bem-element('child1') { | 137 | @include bem.elem('child1') { |
135 | @include iro-bem-next-element('child2') { | 138 | @include bem.next-elem('child2') { |
136 | @include iro-bem-modifier('mod') { | 139 | @include bem.modifier('mod') { |
137 | font-size: 2.5em; | 140 | font-size: 2.5em; |
138 | 141 | ||
139 | @include iro-bem-modifier('submod') { | 142 | @include bem.modifier('submod') { |
140 | font-size: 2.75em; | 143 | font-size: 2.75em; |
141 | } | 144 | } |
142 | } | 145 | } |
@@ -158,13 +161,13 @@ | |||
158 | 161 | ||
159 | @include assert('element modifier, multiple related elements') { /// 6 /// | 162 | @include assert('element modifier, multiple related elements') { /// 6 /// |
160 | @include output { | 163 | @include output { |
161 | @include iro-bem-block('something') { | 164 | @include bem.block('something') { |
162 | @include iro-bem-element('child1') { | 165 | @include bem.elem('child1') { |
163 | @include iro-bem-next-element('child2', 'child3') { | 166 | @include bem.next-elem('child2', 'child3') { |
164 | @include iro-bem-modifier('mod') { | 167 | @include bem.modifier('mod') { |
165 | font-size: 2.5em; | 168 | font-size: 2.5em; |
166 | 169 | ||
167 | @include iro-bem-modifier('submod') { | 170 | @include bem.modifier('submod') { |
168 | font-size: 2.75em; | 171 | font-size: 2.75em; |
169 | } | 172 | } |
170 | } | 173 | } |
@@ -188,13 +191,13 @@ | |||
188 | 191 | ||
189 | @include assert('element modifier, single element, manual selector before') { /// 7 /// | 192 | @include assert('element modifier, single element, manual selector before') { /// 7 /// |
190 | @include output(false) { | 193 | @include output(false) { |
191 | @include iro-bem-block('something') { | 194 | @include bem.block('something') { |
192 | &:hover { | 195 | &:hover { |
193 | @include iro-bem-element('child1') { | 196 | @include bem.elem('child1') { |
194 | @include iro-bem-modifier('mod') { | 197 | @include bem.modifier('mod') { |
195 | font-size: 2.5em; | 198 | font-size: 2.5em; |
196 | 199 | ||
197 | @include iro-bem-modifier('submod') { | 200 | @include bem.modifier('submod') { |
198 | font-size: 2.75em; | 201 | font-size: 2.75em; |
199 | } | 202 | } |
200 | } | 203 | } |
@@ -202,11 +205,11 @@ | |||
202 | } | 205 | } |
203 | 206 | ||
204 | .test & { | 207 | .test & { |
205 | @include iro-bem-element('child2') { | 208 | @include bem.elem('child2') { |
206 | @include iro-bem-modifier('mod') { | 209 | @include bem.modifier('mod') { |
207 | font-size: 2.5em; | 210 | font-size: 2.5em; |
208 | 211 | ||
209 | @include iro-bem-modifier('submod') { | 212 | @include bem.modifier('submod') { |
210 | font-size: 2.75em; | 213 | font-size: 2.75em; |
211 | } | 214 | } |
212 | } | 215 | } |
@@ -236,13 +239,13 @@ | |||
236 | 239 | ||
237 | @include assert('element modifier, multiple elements, manual selector before') { /// 8 /// | 240 | @include assert('element modifier, multiple elements, manual selector before') { /// 8 /// |
238 | @include output(false) { | 241 | @include output(false) { |
239 | @include iro-bem-block('something') { | 242 | @include bem.block('something') { |
240 | &:hover { | 243 | &:hover { |
241 | @include iro-bem-element('child1', 'child2') { | 244 | @include bem.elem('child1', 'child2') { |
242 | @include iro-bem-modifier('mod') { | 245 | @include bem.modifier('mod') { |
243 | font-size: 2.5em; | 246 | font-size: 2.5em; |
244 | 247 | ||
245 | @include iro-bem-modifier('submod') { | 248 | @include bem.modifier('submod') { |
246 | font-size: 2.75em; | 249 | font-size: 2.75em; |
247 | } | 250 | } |
248 | } | 251 | } |
@@ -250,11 +253,11 @@ | |||
250 | } | 253 | } |
251 | 254 | ||
252 | .test & { | 255 | .test & { |
253 | @include iro-bem-element('child3', 'child4') { | 256 | @include bem.elem('child3', 'child4') { |
254 | @include iro-bem-modifier('mod') { | 257 | @include bem.modifier('mod') { |
255 | font-size: 2.5em; | 258 | font-size: 2.5em; |
256 | 259 | ||
257 | @include iro-bem-modifier('submod') { | 260 | @include bem.modifier('submod') { |
258 | font-size: 2.75em; | 261 | font-size: 2.75em; |
259 | } | 262 | } |
260 | } | 263 | } |
@@ -288,14 +291,14 @@ | |||
288 | 291 | ||
289 | @include assert('element modifier, single related element, manual selector before') { /// 9 /// | 292 | @include assert('element modifier, single related element, manual selector before') { /// 9 /// |
290 | @include output(false) { | 293 | @include output(false) { |
291 | @include iro-bem-block('something') { | 294 | @include bem.block('something') { |
292 | &:hover { | 295 | &:hover { |
293 | @include iro-bem-element('child1') { | 296 | @include bem.elem('child1') { |
294 | @include iro-bem-next-element('child2') { | 297 | @include bem.next-elem('child2') { |
295 | @include iro-bem-modifier('mod1') { | 298 | @include bem.modifier('mod1') { |
296 | font-size: 2.5em; | 299 | font-size: 2.5em; |
297 | 300 | ||
298 | @include iro-bem-modifier('submod1') { | 301 | @include bem.modifier('submod1') { |
299 | font-size: 2.75em; | 302 | font-size: 2.75em; |
300 | } | 303 | } |
301 | } | 304 | } |
@@ -304,12 +307,12 @@ | |||
304 | } | 307 | } |
305 | 308 | ||
306 | .test & { | 309 | .test & { |
307 | @include iro-bem-element('child3') { | 310 | @include bem.elem('child3') { |
308 | @include iro-bem-next-element('child4') { | 311 | @include bem.next-elem('child4') { |
309 | @include iro-bem-modifier('mod1') { | 312 | @include bem.modifier('mod1') { |
310 | font-size: 2.5em; | 313 | font-size: 2.5em; |
311 | 314 | ||
312 | @include iro-bem-modifier('submod1') { | 315 | @include bem.modifier('submod1') { |
313 | font-size: 2.75em; | 316 | font-size: 2.75em; |
314 | } | 317 | } |
315 | } | 318 | } |
@@ -317,13 +320,13 @@ | |||
317 | } | 320 | } |
318 | } | 321 | } |
319 | 322 | ||
320 | @include iro-bem-element('child5') { | 323 | @include bem.elem('child5') { |
321 | &:hover { | 324 | &:hover { |
322 | @include iro-bem-next-element('child6') { | 325 | @include bem.next-elem('child6') { |
323 | @include iro-bem-modifier('mod2') { | 326 | @include bem.modifier('mod2') { |
324 | font-size: 2.5em; | 327 | font-size: 2.5em; |
325 | 328 | ||
326 | @include iro-bem-modifier('submod2') { | 329 | @include bem.modifier('submod2') { |
327 | font-size: 2.75em; | 330 | font-size: 2.75em; |
328 | } | 331 | } |
329 | } | 332 | } |
@@ -331,11 +334,11 @@ | |||
331 | } | 334 | } |
332 | 335 | ||
333 | .test & { | 336 | .test & { |
334 | @include iro-bem-next-element('child7') { | 337 | @include bem.next-elem('child7') { |
335 | @include iro-bem-modifier('mod2') { | 338 | @include bem.modifier('mod2') { |
336 | font-size: 2.5em; | 339 | font-size: 2.5em; |
337 | 340 | ||
338 | @include iro-bem-modifier('submod2') { | 341 | @include bem.modifier('submod2') { |
339 | font-size: 2.75em; | 342 | font-size: 2.75em; |
340 | } | 343 | } |
341 | } | 344 | } |
@@ -382,14 +385,14 @@ | |||
382 | 385 | ||
383 | @include assert('element modifier, multiple related elements, manual selector before') { /// 10 /// | 386 | @include assert('element modifier, multiple related elements, manual selector before') { /// 10 /// |
384 | @include output(false) { | 387 | @include output(false) { |
385 | @include iro-bem-block('something') { | 388 | @include bem.block('something') { |
386 | &:hover { | 389 | &:hover { |
387 | @include iro-bem-element('child1') { | 390 | @include bem.elem('child1') { |
388 | @include iro-bem-next-element('child2', 'child3') { | 391 | @include bem.next-elem('child2', 'child3') { |
389 | @include iro-bem-modifier('mod1') { | 392 | @include bem.modifier('mod1') { |
390 | font-size: 2.5em; | 393 | font-size: 2.5em; |
391 | 394 | ||
392 | @include iro-bem-modifier('submod1') { | 395 | @include bem.modifier('submod1') { |
393 | font-size: 2.75em; | 396 | font-size: 2.75em; |
394 | } | 397 | } |
395 | } | 398 | } |
@@ -398,12 +401,12 @@ | |||
398 | } | 401 | } |
399 | 402 | ||
400 | .test & { | 403 | .test & { |
401 | @include iro-bem-element('child4') { | 404 | @include bem.elem('child4') { |
402 | @include iro-bem-next-element('child5', 'child6') { | 405 | @include bem.next-elem('child5', 'child6') { |
403 | @include iro-bem-modifier('mod1') { | 406 | @include bem.modifier('mod1') { |
404 | font-size: 2.5em; | 407 | font-size: 2.5em; |
405 | 408 | ||
406 | @include iro-bem-modifier('submod1') { | 409 | @include bem.modifier('submod1') { |
407 | font-size: 2.75em; | 410 | font-size: 2.75em; |
408 | } | 411 | } |
409 | } | 412 | } |
@@ -411,13 +414,13 @@ | |||
411 | } | 414 | } |
412 | } | 415 | } |
413 | 416 | ||
414 | @include iro-bem-element('child7') { | 417 | @include bem.elem('child7') { |
415 | &:hover { | 418 | &:hover { |
416 | @include iro-bem-next-element('child8', 'child9') { | 419 | @include bem.next-elem('child8', 'child9') { |
417 | @include iro-bem-modifier('mod2') { | 420 | @include bem.modifier('mod2') { |
418 | font-size: 2.5em; | 421 | font-size: 2.5em; |
419 | 422 | ||
420 | @include iro-bem-modifier('submod2') { | 423 | @include bem.modifier('submod2') { |
421 | font-size: 2.75em; | 424 | font-size: 2.75em; |
422 | } | 425 | } |
423 | } | 426 | } |
@@ -425,11 +428,11 @@ | |||
425 | } | 428 | } |
426 | 429 | ||
427 | .test & { | 430 | .test & { |
428 | @include iro-bem-next-element('child10', 'child11') { | 431 | @include bem.next-elem('child10', 'child11') { |
429 | @include iro-bem-modifier('mod2') { | 432 | @include bem.modifier('mod2') { |
430 | font-size: 2.5em; | 433 | font-size: 2.5em; |
431 | 434 | ||
432 | @include iro-bem-modifier('submod2') { | 435 | @include bem.modifier('submod2') { |
433 | font-size: 2.75em; | 436 | font-size: 2.75em; |
434 | } | 437 | } |
435 | } | 438 | } |
@@ -482,47 +485,45 @@ | |||
482 | } | 485 | } |
483 | } | 486 | } |
484 | 487 | ||
485 | /* | 488 | // @include assert('element modifier, in at-theme') { /// 11 /// |
486 | @include assert('element modifier, in at-theme') { /// 11 /// | 489 | // @include output(false) { |
487 | @include output(false) { | 490 | // @include bem.block('something') { |
488 | @include iro-bem-block('something') { | 491 | // @include bem.at-theme('dark') { |
489 | @include iro-bem-at-theme('dark') { | 492 | // @include bem.elem('child') { |
490 | @include iro-bem-element('child') { | 493 | // @include bem.modifier('mod') { |
491 | @include iro-bem-modifier('mod') { | 494 | // font-size: 2.5em; |
492 | font-size: 2.5em; | 495 | // |
493 | 496 | // @include bem.modifier('submod') { | |
494 | @include iro-bem-modifier('submod') { | 497 | // font-size: 2.75em; |
495 | font-size: 2.75em; | 498 | // } |
496 | } | 499 | // } |
497 | } | 500 | // } |
498 | } | 501 | // } |
499 | } | 502 | // } |
500 | } | 503 | // } |
501 | } | 504 | // |
502 | 505 | // @include expect(false) { | |
503 | @include expect(false) { | 506 | // .t-dark .something__child--mod, |
504 | .t-dark .something__child--mod, | 507 | // [class*=' t-'] .t-dark .something__child--mod, |
505 | [class*=' t-'] .t-dark .something__child--mod, | 508 | // [class^='t-'] .t-dark .something__child--mod { |
506 | [class^='t-'] .t-dark .something__child--mod { | 509 | // font-size: 2.5em; |
507 | font-size: 2.5em; | 510 | // } |
508 | } | 511 | // |
509 | 512 | // .t-dark .something__child--mod.something__child--submod, | |
510 | .t-dark .something__child--mod.something__child--submod, | 513 | // [class*=' t-'] .t-dark .something__child--mod.something__child--submod, |
511 | [class*=' t-'] .t-dark .something__child--mod.something__child--submod, | 514 | // [class^='t-'] .t-dark .something__child--mod.something__child--submod { |
512 | [class^='t-'] .t-dark .something__child--mod.something__child--submod { | 515 | // font-size: 2.75em; |
513 | font-size: 2.75em; | 516 | // } |
514 | } | 517 | // } |
515 | } | 518 | // } |
516 | } | ||
517 | */ | ||
518 | 519 | ||
519 | @include assert('nested block modifiers, extending') { /// 12 /// | 520 | @include assert('nested block modifiers, extending') { /// 12 /// |
520 | @include output { | 521 | @include output { |
521 | @include iro-bem-block('something') { | 522 | @include bem.block('something') { |
522 | @include iro-bem-modifier('mod') { | 523 | @include bem.modifier('mod') { |
523 | font-size: 1.5em; | 524 | font-size: 1.5em; |
524 | 525 | ||
525 | @include iro-bem-modifier('submod' true) { | 526 | @include bem.modifier('submod' true) { |
526 | font-size: 1.75em; | 527 | font-size: 1.75em; |
527 | } | 528 | } |
528 | } | 529 | } |
@@ -542,12 +543,12 @@ | |||
542 | 543 | ||
543 | @include assert('nested element modifiers, extending') { /// 13 /// | 544 | @include assert('nested element modifiers, extending') { /// 13 /// |
544 | @include output { | 545 | @include output { |
545 | @include iro-bem-block('something') { | 546 | @include bem.block('something') { |
546 | @include iro-bem-element('child') { | 547 | @include bem.elem('child') { |
547 | @include iro-bem-modifier('mod') { | 548 | @include bem.modifier('mod') { |
548 | font-size: 2.5em; | 549 | font-size: 2.5em; |
549 | 550 | ||
550 | @include iro-bem-modifier('submod' true) { | 551 | @include bem.modifier('submod' true) { |
551 | font-size: 2.75em; | 552 | font-size: 2.75em; |
552 | } | 553 | } |
553 | } | 554 | } |
@@ -568,19 +569,19 @@ | |||
568 | 569 | ||
569 | @include assert('block and element modifiers, single element') { /// 14 /// | 570 | @include assert('block and element modifiers, single element') { /// 14 /// |
570 | @include output { | 571 | @include output { |
571 | @include iro-bem-block('something') { | 572 | @include bem.block('something') { |
572 | @include iro-bem-modifier('mod1') { | 573 | @include bem.modifier('mod1') { |
573 | font-size: 1.5em; | 574 | font-size: 1.5em; |
574 | 575 | ||
575 | @include iro-bem-modifier('submod1') { | 576 | @include bem.modifier('submod1') { |
576 | font-size: 1.75em; | 577 | font-size: 1.75em; |
577 | } | 578 | } |
578 | 579 | ||
579 | @include iro-bem-element('child') { | 580 | @include bem.elem('child') { |
580 | @include iro-bem-modifier('mod2') { | 581 | @include bem.modifier('mod2') { |
581 | font-size: 2.5em; | 582 | font-size: 2.5em; |
582 | 583 | ||
583 | @include iro-bem-modifier('submod2') { | 584 | @include bem.modifier('submod2') { |
584 | font-size: 2.75em; | 585 | font-size: 2.75em; |
585 | } | 586 | } |
586 | } | 587 | } |
@@ -610,19 +611,19 @@ | |||
610 | 611 | ||
611 | @include assert('block and element modifiers, multiple elements') { /// 15 /// | 612 | @include assert('block and element modifiers, multiple elements') { /// 15 /// |
612 | @include output { | 613 | @include output { |
613 | @include iro-bem-block('something') { | 614 | @include bem.block('something') { |
614 | @include iro-bem-modifier('mod1') { | 615 | @include bem.modifier('mod1') { |
615 | font-size: 1.5em; | 616 | font-size: 1.5em; |
616 | 617 | ||
617 | @include iro-bem-modifier('submod') { | 618 | @include bem.modifier('submod1') { |
618 | font-size: 1.75em; | 619 | font-size: 1.75em; |
619 | } | 620 | } |
620 | 621 | ||
621 | @include iro-bem-element('child1', 'child2') { | 622 | @include bem.elem('child1', 'child2') { |
622 | @include iro-bem-modifier('mod2') { | 623 | @include bem.modifier('mod2') { |
623 | font-size: 2.5em; | 624 | font-size: 2.5em; |
624 | 625 | ||
625 | @include iro-bem-modifier('submod2') { | 626 | @include bem.modifier('submod2') { |
626 | font-size: 2.75em; | 627 | font-size: 2.75em; |
627 | } | 628 | } |
628 | } | 629 | } |
diff --git a/test/bem/_iro-bem-multi.scss b/test/bem/_multi.scss index 84bbca2..255fb45 100644 --- a/test/bem/_iro-bem-multi.scss +++ b/test/bem/_multi.scss | |||
@@ -1,5 +1,8 @@ | |||
1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations | 1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations |
2 | 2 | ||
3 | @use 'true' as *; | ||
4 | @use '../../src/bem'; | ||
5 | |||
3 | // | 6 | // |
4 | // Included test cases: | 7 | // Included test cases: |
5 | // - /// 1 /// - in root, 2 blocks | 8 | // - /// 1 /// - in root, 2 blocks |
@@ -22,13 +25,13 @@ | |||
22 | // - /// 18 /// - in multiple elements, 1 twin element, 1 modifier | 25 | // - /// 18 /// - in multiple elements, 1 twin element, 1 modifier |
23 | // | 26 | // |
24 | 27 | ||
25 | @include it('iro-bem-state') { | 28 | @include it('multi') { |
26 | @include assert('in root, 2 blocks') { /// 1 /// | 29 | @include assert('in root, 2 blocks') { /// 1 /// |
27 | @include output { | 30 | @include output { |
28 | @include iro-bem-multi('component:' 'block1', 'object:' 'block2') { | 31 | @include bem.multi('component:' 'block1', 'object:' 'block2') { |
29 | font-size: 1em; | 32 | font-size: 1em; |
30 | 33 | ||
31 | @include iro-bem-element('child2') { | 34 | @include bem.elem('child2') { |
32 | font-size: 2em; | 35 | font-size: 2em; |
33 | } | 36 | } |
34 | } | 37 | } |
@@ -55,7 +58,7 @@ | |||
55 | 58 | ||
56 | @include assert('in root, 1 block, 1 manual selector') { /// 2 /// | 59 | @include assert('in root, 1 block, 1 manual selector') { /// 2 /// |
57 | @include output { | 60 | @include output { |
58 | @include iro-bem-multi('component:' 'block1', 'a:hover') { | 61 | @include bem.multi('component:' 'block1', 'a:hover') { |
59 | font-size: 1em; | 62 | font-size: 1em; |
60 | } | 63 | } |
61 | } | 64 | } |
@@ -73,11 +76,11 @@ | |||
73 | 76 | ||
74 | @include assert('in block, 2 elements') { /// 3 /// | 77 | @include assert('in block, 2 elements') { /// 3 /// |
75 | @include output { | 78 | @include output { |
76 | @include iro-bem-block('something') { | 79 | @include bem.block('something') { |
77 | @include iro-bem-multi('element:' 'child1' 'child2') { | 80 | @include bem.multi('elem:' 'child1' 'child2') { |
78 | font-size: 2em; | 81 | font-size: 2em; |
79 | 82 | ||
80 | @include iro-bem-modifier('mod') { | 83 | @include bem.modifier('mod') { |
81 | font-size: 2.5em; | 84 | font-size: 2.5em; |
82 | } | 85 | } |
83 | } | 86 | } |
@@ -99,11 +102,11 @@ | |||
99 | 102 | ||
100 | @include assert('in block, 1 element, 1 modifier') { /// 4 /// | 103 | @include assert('in block, 1 element, 1 modifier') { /// 4 /// |
101 | @include output { | 104 | @include output { |
102 | @include iro-bem-block('something') { | 105 | @include bem.block('something') { |
103 | @include iro-bem-multi('element:' 'child', 'modifier:' 'mod1') { | 106 | @include bem.multi('elem:' 'child', 'modifier:' 'mod1') { |
104 | font-size: 2em; | 107 | font-size: 2em; |
105 | 108 | ||
106 | @include iro-bem-modifier('mod2') { | 109 | @include bem.modifier('mod2') { |
107 | font-size: 2.5em; | 110 | font-size: 2.5em; |
108 | } | 111 | } |
109 | } | 112 | } |
@@ -131,11 +134,11 @@ | |||
131 | 134 | ||
132 | @include assert('in block, 1 element, 1 extending modifier') { /// 5 /// | 135 | @include assert('in block, 1 element, 1 extending modifier') { /// 5 /// |
133 | @include output { | 136 | @include output { |
134 | @include iro-bem-block('something') { | 137 | @include bem.block('something') { |
135 | @include iro-bem-multi('element:' 'child', 'modifier:' 'mod1') { | 138 | @include bem.multi('elem:' 'child', 'modifier:' 'mod1') { |
136 | font-size: 2em; | 139 | font-size: 2em; |
137 | 140 | ||
138 | @include iro-bem-modifier('mod2' true) { | 141 | @include bem.modifier('mod2' true) { |
139 | font-size: 2.5em; | 142 | font-size: 2.5em; |
140 | } | 143 | } |
141 | } | 144 | } |
@@ -163,11 +166,11 @@ | |||
163 | 166 | ||
164 | @include assert('in block, 1 element, 1 & selector') { /// 6 /// | 167 | @include assert('in block, 1 element, 1 & selector') { /// 6 /// |
165 | @include output { | 168 | @include output { |
166 | @include iro-bem-block('something') { | 169 | @include bem.block('something') { |
167 | @include iro-bem-multi('&', 'element:' 'child') { | 170 | @include bem.multi('&', 'elem:' 'child') { |
168 | font-size: 2em; | 171 | font-size: 2em; |
169 | 172 | ||
170 | @include iro-bem-modifier('mod') { | 173 | @include bem.modifier('mod') { |
171 | font-size: 2.5em; | 174 | font-size: 2.5em; |
172 | } | 175 | } |
173 | } | 176 | } |
@@ -195,11 +198,11 @@ | |||
195 | 198 | ||
196 | @include assert('in block, 1 element, 1 manual selector') { /// 7 /// | 199 | @include assert('in block, 1 element, 1 manual selector') { /// 7 /// |
197 | @include output { | 200 | @include output { |
198 | @include iro-bem-block('something') { | 201 | @include bem.block('something') { |
199 | @include iro-bem-multi('> a:hover', 'element:' 'child1') { | 202 | @include bem.multi('> a:hover', 'elem:' 'child1') { |
200 | font-size: 2em; | 203 | font-size: 2em; |
201 | 204 | ||
202 | @include iro-bem-element('child2') { | 205 | @include bem.elem('child2') { |
203 | font-size: 3em; | 206 | font-size: 3em; |
204 | } | 207 | } |
205 | } | 208 | } |
@@ -227,12 +230,12 @@ | |||
227 | 230 | ||
228 | @include assert('in element, 2 elements, 1 modifier') { /// 8 /// | 231 | @include assert('in element, 2 elements, 1 modifier') { /// 8 /// |
229 | @include output { | 232 | @include output { |
230 | @include iro-bem-block('something') { | 233 | @include bem.block('something') { |
231 | @include iro-bem-element('child') { | 234 | @include bem.elem('child') { |
232 | @include iro-bem-multi('element:' 'subchild1' 'subchild2', 'modifier:' 'mod1') { | 235 | @include bem.multi('elem:' 'subchild1' 'subchild2', 'modifier:' 'mod1') { |
233 | font-size: 3em; | 236 | font-size: 3em; |
234 | 237 | ||
235 | @include iro-bem-modifier('mod2') { | 238 | @include bem.modifier('mod2') { |
236 | font-size: 3.5em; | 239 | font-size: 3.5em; |
237 | } | 240 | } |
238 | } | 241 | } |
@@ -263,12 +266,12 @@ | |||
263 | 266 | ||
264 | @include assert('in element, 1 element, 1 & selector') { /// 9 /// | 267 | @include assert('in element, 1 element, 1 & selector') { /// 9 /// |
265 | @include output { | 268 | @include output { |
266 | @include iro-bem-block('something') { | 269 | @include bem.block('something') { |
267 | @include iro-bem-element('child') { | 270 | @include bem.elem('child') { |
268 | @include iro-bem-multi('element:' 'subchild', '&') { | 271 | @include bem.multi('elem:' 'subchild', '&') { |
269 | font-size: 3em; | 272 | font-size: 3em; |
270 | 273 | ||
271 | @include iro-bem-modifier('mod') { | 274 | @include bem.modifier('mod') { |
272 | font-size: 3.5em; | 275 | font-size: 3.5em; |
273 | } | 276 | } |
274 | } | 277 | } |
@@ -297,13 +300,13 @@ | |||
297 | 300 | ||
298 | @include assert('in element in manual selector, 2 elements') { /// 10 /// | 301 | @include assert('in element in manual selector, 2 elements') { /// 10 /// |
299 | @include output { | 302 | @include output { |
300 | @include iro-bem-block('something') { | 303 | @include bem.block('something') { |
301 | @include iro-bem-element('child') { | 304 | @include bem.elem('child') { |
302 | &:hover { | 305 | &:hover { |
303 | @include iro-bem-multi('element:' 'subchild1' 'subchild2') { | 306 | @include bem.multi('elem:' 'subchild1' 'subchild2') { |
304 | font-size: 3em; | 307 | font-size: 3em; |
305 | 308 | ||
306 | @include iro-bem-modifier('mod2') { | 309 | @include bem.modifier('mod2') { |
307 | font-size: 3.5em; | 310 | font-size: 3.5em; |
308 | } | 311 | } |
309 | } | 312 | } |
@@ -327,10 +330,10 @@ | |||
327 | 330 | ||
328 | @include assert('in element in manual selector, 1 element, 1 & selector') { /// 11 /// | 331 | @include assert('in element in manual selector, 1 element, 1 & selector') { /// 11 /// |
329 | @include output { | 332 | @include output { |
330 | @include iro-bem-block('something') { | 333 | @include bem.block('something') { |
331 | @include iro-bem-element('child') { | 334 | @include bem.elem('child') { |
332 | &:hover { | 335 | &:hover { |
333 | @include iro-bem-multi('element:' 'subchild', '&') { | 336 | @include bem.multi('elem:' 'subchild', '&') { |
334 | font-size: 3em; | 337 | font-size: 3em; |
335 | } | 338 | } |
336 | } | 339 | } |
@@ -351,9 +354,9 @@ | |||
351 | 354 | ||
352 | @include assert('in multiple elements, 2 elements, 1 modifier') { /// 12 /// | 355 | @include assert('in multiple elements, 2 elements, 1 modifier') { /// 12 /// |
353 | @include output { | 356 | @include output { |
354 | @include iro-bem-block('something') { | 357 | @include bem.block('something') { |
355 | @include iro-bem-element('child1', 'child2') { | 358 | @include bem.elem('child1', 'child2') { |
356 | @include iro-bem-multi('element:' 'subchild1' 'subchild2', 'modifier:' 'mod') { | 359 | @include bem.multi('elem:' 'subchild1' 'subchild2', 'modifier:' 'mod') { |
357 | font-size: 3em; | 360 | font-size: 3em; |
358 | } | 361 | } |
359 | } | 362 | } |
@@ -377,12 +380,12 @@ | |||
377 | 380 | ||
378 | @include assert('in multiple elements, 1 element, 1 & selector') { /// 13 /// | 381 | @include assert('in multiple elements, 1 element, 1 & selector') { /// 13 /// |
379 | @include output { | 382 | @include output { |
380 | @include iro-bem-block('something') { | 383 | @include bem.block('something') { |
381 | @include iro-bem-element('child1', 'child2') { | 384 | @include bem.elem('child1', 'child2') { |
382 | @include iro-bem-multi('element:' 'subchild', '&') { | 385 | @include bem.multi('elem:' 'subchild', '&') { |
383 | font-size: 3em; | 386 | font-size: 3em; |
384 | 387 | ||
385 | @include iro-bem-modifier('mod') { | 388 | @include bem.modifier('mod') { |
386 | font-size: 3.5em; | 389 | font-size: 3.5em; |
387 | } | 390 | } |
388 | } | 391 | } |
@@ -415,10 +418,10 @@ | |||
415 | 418 | ||
416 | @include assert('in related elements, 2 elements, 1 modifier') { /// 14 /// | 419 | @include assert('in related elements, 2 elements, 1 modifier') { /// 14 /// |
417 | @include output { | 420 | @include output { |
418 | @include iro-bem-block('something') { | 421 | @include bem.block('something') { |
419 | @include iro-bem-element('child1') { | 422 | @include bem.elem('child1') { |
420 | @include iro-bem-next-element('child2', 'child3') { | 423 | @include bem.next-elem('child2', 'child3') { |
421 | @include iro-bem-multi('element:' 'subchild1' 'subchild2', 'modifier:' 'mod') { | 424 | @include bem.multi('elem:' 'subchild1' 'subchild2', 'modifier:' 'mod') { |
422 | font-size: 3em; | 425 | font-size: 3em; |
423 | } | 426 | } |
424 | } | 427 | } |
@@ -443,13 +446,13 @@ | |||
443 | 446 | ||
444 | @include assert('in related elements, 1 element, 1 & selector') { /// 15 /// | 447 | @include assert('in related elements, 1 element, 1 & selector') { /// 15 /// |
445 | @include output { | 448 | @include output { |
446 | @include iro-bem-block('something') { | 449 | @include bem.block('something') { |
447 | @include iro-bem-element('child1') { | 450 | @include bem.elem('child1') { |
448 | @include iro-bem-next-element('child2', 'child3') { | 451 | @include bem.next-elem('child2', 'child3') { |
449 | @include iro-bem-multi('element:' 'subchild', '&') { | 452 | @include bem.multi('elem:' 'subchild', '&') { |
450 | font-size: 4em; | 453 | font-size: 4em; |
451 | 454 | ||
452 | @include iro-bem-modifier('mod') { | 455 | @include bem.modifier('mod') { |
453 | font-size: 4.5em; | 456 | font-size: 4.5em; |
454 | } | 457 | } |
455 | } | 458 | } |
@@ -483,12 +486,12 @@ | |||
483 | 486 | ||
484 | @include assert('in element, 2 related elements, 1 modifier') { /// 16 /// | 487 | @include assert('in element, 2 related elements, 1 modifier') { /// 16 /// |
485 | @include output { | 488 | @include output { |
486 | @include iro-bem-block('something') { | 489 | @include bem.block('something') { |
487 | @include iro-bem-element('child1') { | 490 | @include bem.elem('child1') { |
488 | @include iro-bem-multi('next-element:' 'child2' 'child3', 'modifier:' 'mod1') { | 491 | @include bem.multi('next-elem:' 'child2' 'child3', 'modifier:' 'mod1') { |
489 | font-size: 3em; | 492 | font-size: 3em; |
490 | 493 | ||
491 | @include iro-bem-modifier('mod2') { | 494 | @include bem.modifier('mod2') { |
492 | font-size: 3.5em; | 495 | font-size: 3.5em; |
493 | } | 496 | } |
494 | } | 497 | } |
@@ -519,12 +522,12 @@ | |||
519 | 522 | ||
520 | @include assert('in element, 1 twin element, 1 modifier') { /// 17 /// | 523 | @include assert('in element, 1 twin element, 1 modifier') { /// 17 /// |
521 | @include output { | 524 | @include output { |
522 | @include iro-bem-block('something') { | 525 | @include bem.block('something') { |
523 | @include iro-bem-element('child') { | 526 | @include bem.elem('child') { |
524 | @include iro-bem-multi('next-twin-element', 'modifier:' 'mod1') { | 527 | @include bem.multi('next-twin-elem', 'modifier:' 'mod1') { |
525 | font-size: 3em; | 528 | font-size: 3em; |
526 | 529 | ||
527 | @include iro-bem-modifier('mod2') { | 530 | @include bem.modifier('mod2') { |
528 | font-size: 3.5em; | 531 | font-size: 3.5em; |
529 | } | 532 | } |
530 | } | 533 | } |
@@ -553,12 +556,12 @@ | |||
553 | 556 | ||
554 | @include assert('in multiple elements, 1 twin element, 1 modifier') { /// 18 /// | 557 | @include assert('in multiple elements, 1 twin element, 1 modifier') { /// 18 /// |
555 | @include output { | 558 | @include output { |
556 | @include iro-bem-block('something') { | 559 | @include bem.block('something') { |
557 | @include iro-bem-element('child1', 'child2') { | 560 | @include bem.elem('child1', 'child2') { |
558 | @include iro-bem-multi('next-twin-element', 'modifier:' 'mod1') { | 561 | @include bem.multi('next-twin-elem', 'modifier:' 'mod1') { |
559 | font-size: 3em; | 562 | font-size: 3em; |
560 | 563 | ||
561 | @include iro-bem-modifier('mod2') { | 564 | @include bem.modifier('mod2') { |
562 | font-size: 3.5em; | 565 | font-size: 3.5em; |
563 | } | 566 | } |
564 | } | 567 | } |
diff --git a/test/bem/_iro-bem-next-twin-element.scss b/test/bem/_next-twin-element.scss index 96fc3a9..85fe473 100644 --- a/test/bem/_iro-bem-next-twin-element.scss +++ b/test/bem/_next-twin-element.scss | |||
@@ -1,5 +1,8 @@ | |||
1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations | 1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations |
2 | 2 | ||
3 | @use 'true' as *; | ||
4 | @use '../../src/bem'; | ||
5 | |||
3 | // | 6 | // |
4 | // Included test cases: | 7 | // Included test cases: |
5 | // - /// 1 /// - single element | 8 | // - /// 1 /// - single element |
@@ -10,12 +13,12 @@ | |||
10 | // - /// 6 /// - multiple elements, modifier in-between | 13 | // - /// 6 /// - multiple elements, modifier in-between |
11 | // | 14 | // |
12 | 15 | ||
13 | @include it('iro-bem-next-twin-element') { | 16 | @include it('next-twin-element') { |
14 | @include assert('single element') { /// 1 /// | 17 | @include assert('single element') { /// 1 /// |
15 | @include output { | 18 | @include output { |
16 | @include iro-bem-block('something') { | 19 | @include bem.block('something') { |
17 | @include iro-bem-element('child') { | 20 | @include bem.elem('child') { |
18 | @include iro-bem-next-twin-element { | 21 | @include bem.next-twin-element { |
19 | font-size: 2em; | 22 | font-size: 2em; |
20 | } | 23 | } |
21 | } | 24 | } |
@@ -31,16 +34,16 @@ | |||
31 | 34 | ||
32 | @include assert('single element, manual selector in-between') { /// 2 /// | 35 | @include assert('single element, manual selector in-between') { /// 2 /// |
33 | @include output(false) { | 36 | @include output(false) { |
34 | @include iro-bem-block('something') { | 37 | @include bem.block('something') { |
35 | @include iro-bem-element('child') { | 38 | @include bem.elem('child') { |
36 | &:hover { | 39 | &:hover { |
37 | @include iro-bem-next-twin-element { | 40 | @include bem.next-twin-element { |
38 | font-size: 2em; | 41 | font-size: 2em; |
39 | } | 42 | } |
40 | } | 43 | } |
41 | 44 | ||
42 | .test & { | 45 | .test & { |
43 | @include iro-bem-next-twin-element { | 46 | @include bem.next-twin-element { |
44 | font-size: 2em; | 47 | font-size: 2em; |
45 | } | 48 | } |
46 | } | 49 | } |
@@ -61,10 +64,10 @@ | |||
61 | 64 | ||
62 | @include assert('single element, modifier in-between') { /// 3 /// | 65 | @include assert('single element, modifier in-between') { /// 3 /// |
63 | @include output { | 66 | @include output { |
64 | @include iro-bem-block('something') { | 67 | @include bem.block('something') { |
65 | @include iro-bem-element('child') { | 68 | @include bem.elem('child') { |
66 | @include iro-bem-modifier('mod') { | 69 | @include bem.modifier('mod') { |
67 | @include iro-bem-next-twin-element { | 70 | @include bem.next-twin-element { |
68 | font-size: 2.5em; | 71 | font-size: 2.5em; |
69 | } | 72 | } |
70 | } | 73 | } |
@@ -81,9 +84,9 @@ | |||
81 | 84 | ||
82 | @include assert('multiple elements') { /// 4 /// | 85 | @include assert('multiple elements') { /// 4 /// |
83 | @include output { | 86 | @include output { |
84 | @include iro-bem-block('something') { | 87 | @include bem.block('something') { |
85 | @include iro-bem-element('child1', 'child2') { | 88 | @include bem.elem('child1', 'child2') { |
86 | @include iro-bem-next-twin-element { | 89 | @include bem.next-twin-element { |
87 | font-size: 2em; | 90 | font-size: 2em; |
88 | } | 91 | } |
89 | } | 92 | } |
@@ -100,16 +103,16 @@ | |||
100 | 103 | ||
101 | @include assert('multiple elements, manual selector in-between') { /// 5 /// | 104 | @include assert('multiple elements, manual selector in-between') { /// 5 /// |
102 | @include output(false) { | 105 | @include output(false) { |
103 | @include iro-bem-block('something') { | 106 | @include bem.block('something') { |
104 | @include iro-bem-element('child1', 'child2') { | 107 | @include bem.elem('child1', 'child2') { |
105 | &:hover { | 108 | &:hover { |
106 | @include iro-bem-next-twin-element { | 109 | @include bem.next-twin-element { |
107 | font-size: 2em; | 110 | font-size: 2em; |
108 | } | 111 | } |
109 | } | 112 | } |
110 | 113 | ||
111 | .test & { | 114 | .test & { |
112 | @include iro-bem-next-twin-element { | 115 | @include bem.next-twin-element { |
113 | font-size: 2em; | 116 | font-size: 2em; |
114 | } | 117 | } |
115 | } | 118 | } |
@@ -132,10 +135,10 @@ | |||
132 | 135 | ||
133 | @include assert('multiple elements, modifier in-between') { /// 6 /// | 136 | @include assert('multiple elements, modifier in-between') { /// 6 /// |
134 | @include output { | 137 | @include output { |
135 | @include iro-bem-block('something') { | 138 | @include bem.block('something') { |
136 | @include iro-bem-element('child1', 'child2') { | 139 | @include bem.elem('child1', 'child2') { |
137 | @include iro-bem-modifier('mod') { | 140 | @include bem.modifier('mod') { |
138 | @include iro-bem-next-twin-element { | 141 | @include bem.next-twin-element { |
139 | font-size: 2.5em; | 142 | font-size: 2.5em; |
140 | } | 143 | } |
141 | } | 144 | } |
diff --git a/test/bem/_iro-bem-related-element.scss b/test/bem/_related-element.scss index b0c6b94..5a829e8 100644 --- a/test/bem/_iro-bem-related-element.scss +++ b/test/bem/_related-element.scss | |||
@@ -1,5 +1,8 @@ | |||
1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations | 1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations |
2 | 2 | ||
3 | @use 'true' as *; | ||
4 | @use '../../src/bem'; | ||
5 | |||
3 | // | 6 | // |
4 | // Included test cases: | 7 | // Included test cases: |
5 | // - /// 1 /// - single element, single related element | 8 | // - /// 1 /// - single element, single related element |
@@ -16,16 +19,16 @@ | |||
16 | // - /// 12 /// - multiple elements, multiple related elements, modifier in-between | 19 | // - /// 12 /// - multiple elements, multiple related elements, modifier in-between |
17 | // | 20 | // |
18 | 21 | ||
19 | @include it('iro-bem-related-element') { | 22 | @include it('related-element') { |
20 | @include assert('single element, single related element') { /// 1 /// | 23 | @include assert('single element, single related element') { /// 1 /// |
21 | @include output { | 24 | @include output { |
22 | @include iro-bem-block('something') { | 25 | @include bem.block('something') { |
23 | @include iro-bem-element('child') { | 26 | @include bem.elem('child') { |
24 | @include iro-bem-related-element('+', 'subchild1') { | 27 | @include bem.related-elem('+', 'subchild1') { |
25 | font-size: 2em; | 28 | font-size: 2em; |
26 | } | 29 | } |
27 | 30 | ||
28 | @include iro-bem-related-element('~', 'subchild2') { | 31 | @include bem.related-elem('~', 'subchild2') { |
29 | font-size: 2em; | 32 | font-size: 2em; |
30 | } | 33 | } |
31 | } | 34 | } |
@@ -45,24 +48,24 @@ | |||
45 | 48 | ||
46 | @include assert('single element, single related element, manual selector in-between') { /// 2 /// | 49 | @include assert('single element, single related element, manual selector in-between') { /// 2 /// |
47 | @include output(false) { | 50 | @include output(false) { |
48 | @include iro-bem-block('something') { | 51 | @include bem.block('something') { |
49 | @include iro-bem-element('child') { | 52 | @include bem.elem('child') { |
50 | &:hover { | 53 | &:hover { |
51 | @include iro-bem-related-element('+', 'subchild1') { | 54 | @include bem.related-elem('+', 'subchild1') { |
52 | font-size: 2em; | 55 | font-size: 2em; |
53 | } | 56 | } |
54 | 57 | ||
55 | @include iro-bem-related-element('~', 'subchild2') { | 58 | @include bem.related-elem('~', 'subchild2') { |
56 | font-size: 2em; | 59 | font-size: 2em; |
57 | } | 60 | } |
58 | } | 61 | } |
59 | 62 | ||
60 | .test & { | 63 | .test & { |
61 | @include iro-bem-related-element('+', 'subchild3') { | 64 | @include bem.related-elem('+', 'subchild3') { |
62 | font-size: 2em; | 65 | font-size: 2em; |
63 | } | 66 | } |
64 | 67 | ||
65 | @include iro-bem-related-element('~', 'subchild4') { | 68 | @include bem.related-elem('~', 'subchild4') { |
66 | font-size: 2em; | 69 | font-size: 2em; |
67 | } | 70 | } |
68 | } | 71 | } |
@@ -91,14 +94,14 @@ | |||
91 | 94 | ||
92 | @include assert('single element, single related element, modifier in-between') { /// 3 /// | 95 | @include assert('single element, single related element, modifier in-between') { /// 3 /// |
93 | @include output { | 96 | @include output { |
94 | @include iro-bem-block('something') { | 97 | @include bem.block('something') { |
95 | @include iro-bem-element('child') { | 98 | @include bem.elem('child') { |
96 | @include iro-bem-modifier('mod') { | 99 | @include bem.modifier('mod') { |
97 | @include iro-bem-related-element('+', 'subchild1') { | 100 | @include bem.related-elem('+', 'subchild1') { |
98 | font-size: 2.5em; | 101 | font-size: 2.5em; |
99 | } | 102 | } |
100 | 103 | ||
101 | @include iro-bem-related-element('~', 'subchild2') { | 104 | @include bem.related-elem('~', 'subchild2') { |
102 | font-size: 2.5em; | 105 | font-size: 2.5em; |
103 | } | 106 | } |
104 | } | 107 | } |
@@ -119,13 +122,13 @@ | |||
119 | 122 | ||
120 | @include assert('single element, multiple related elements') { /// 4 /// | 123 | @include assert('single element, multiple related elements') { /// 4 /// |
121 | @include output { | 124 | @include output { |
122 | @include iro-bem-block('something') { | 125 | @include bem.block('something') { |
123 | @include iro-bem-element('child') { | 126 | @include bem.elem('child') { |
124 | @include iro-bem-related-element('+', 'subchild1', 'subchild2') { | 127 | @include bem.related-elem('+', 'subchild1', 'subchild2') { |
125 | font-size: 2.5em; | 128 | font-size: 2.5em; |
126 | } | 129 | } |
127 | 130 | ||
128 | @include iro-bem-related-element('~', 'subchild3', 'subchild4') { | 131 | @include bem.related-elem('~', 'subchild3', 'subchild4') { |
129 | font-size: 2.5em; | 132 | font-size: 2.5em; |
130 | } | 133 | } |
131 | } | 134 | } |
@@ -147,24 +150,24 @@ | |||
147 | 150 | ||
148 | @include assert('single element, multiple related elements, manual selector in-between') { /// 5 /// | 151 | @include assert('single element, multiple related elements, manual selector in-between') { /// 5 /// |
149 | @include output(false) { | 152 | @include output(false) { |
150 | @include iro-bem-block('something') { | 153 | @include bem.block('something') { |
151 | @include iro-bem-element('child') { | 154 | @include bem.elem('child') { |
152 | &:hover { | 155 | &:hover { |
153 | @include iro-bem-related-element('+', 'subchild1', 'subchild2') { | 156 | @include bem.related-elem('+', 'subchild1', 'subchild2') { |
154 | font-size: 2.5em; | 157 | font-size: 2.5em; |
155 | } | 158 | } |
156 | 159 | ||
157 | @include iro-bem-related-element('~', 'subchild3', 'subchild4') { | 160 | @include bem.related-elem('~', 'subchild3', 'subchild4') { |
158 | font-size: 2.5em; | 161 | font-size: 2.5em; |
159 | } | 162 | } |
160 | } | 163 | } |
161 | 164 | ||
162 | .test & { | 165 | .test & { |
163 | @include iro-bem-related-element('+', 'subchild5', 'subchild6') { | 166 | @include bem.related-elem('+', 'subchild5', 'subchild6') { |
164 | font-size: 2.5em; | 167 | font-size: 2.5em; |
165 | } | 168 | } |
166 | 169 | ||
167 | @include iro-bem-related-element('~', 'subchild7', 'subchild8') { | 170 | @include bem.related-elem('~', 'subchild7', 'subchild8') { |
168 | font-size: 2.5em; | 171 | font-size: 2.5em; |
169 | } | 172 | } |
170 | } | 173 | } |
@@ -197,14 +200,14 @@ | |||
197 | 200 | ||
198 | @include assert('single element, multiple related elements, modifier in-between') { /// 6 /// | 201 | @include assert('single element, multiple related elements, modifier in-between') { /// 6 /// |
199 | @include output { | 202 | @include output { |
200 | @include iro-bem-block('something') { | 203 | @include bem.block('something') { |
201 | @include iro-bem-element('child') { | 204 | @include bem.elem('child') { |
202 | @include iro-bem-modifier('mod') { | 205 | @include bem.modifier('mod') { |
203 | @include iro-bem-related-element('+', 'subchild1', 'subchild2') { | 206 | @include bem.related-elem('+', 'subchild1', 'subchild2') { |
204 | font-size: 2.5em; | 207 | font-size: 2.5em; |
205 | } | 208 | } |
206 | 209 | ||
207 | @include iro-bem-related-element('~', 'subchild3', 'subchild4') { | 210 | @include bem.related-elem('~', 'subchild3', 'subchild4') { |
208 | font-size: 2.5em; | 211 | font-size: 2.5em; |
209 | } | 212 | } |
210 | } | 213 | } |
@@ -227,13 +230,13 @@ | |||
227 | 230 | ||
228 | @include assert('multiple elements, single related element') { /// 7 /// | 231 | @include assert('multiple elements, single related element') { /// 7 /// |
229 | @include output { | 232 | @include output { |
230 | @include iro-bem-block('something') { | 233 | @include bem.block('something') { |
231 | @include iro-bem-element('child1', 'child2') { | 234 | @include bem.elem('child1', 'child2') { |
232 | @include iro-bem-related-element('+', 'subchild1') { | 235 | @include bem.related-elem('+', 'subchild1') { |
233 | font-size: 2em; | 236 | font-size: 2em; |
234 | } | 237 | } |
235 | 238 | ||
236 | @include iro-bem-related-element('~', 'subchild2') { | 239 | @include bem.related-elem('~', 'subchild2') { |
237 | font-size: 2em; | 240 | font-size: 2em; |
238 | } | 241 | } |
239 | } | 242 | } |
@@ -255,24 +258,24 @@ | |||
255 | 258 | ||
256 | @include assert('multiple elements, single related element, manual selector in-between') { /// 8 /// | 259 | @include assert('multiple elements, single related element, manual selector in-between') { /// 8 /// |
257 | @include output(false) { | 260 | @include output(false) { |
258 | @include iro-bem-block('something') { | 261 | @include bem.block('something') { |
259 | @include iro-bem-element('child1', 'child2') { | 262 | @include bem.elem('child1', 'child2') { |
260 | &:hover { | 263 | &:hover { |
261 | @include iro-bem-related-element('+', 'subchild1') { | 264 | @include bem.related-elem('+', 'subchild1') { |
262 | font-size: 2em; | 265 | font-size: 2em; |
263 | } | 266 | } |
264 | 267 | ||
265 | @include iro-bem-related-element('~', 'subchild2') { | 268 | @include bem.related-elem('~', 'subchild2') { |
266 | font-size: 2em; | 269 | font-size: 2em; |
267 | } | 270 | } |
268 | } | 271 | } |
269 | 272 | ||
270 | .test & { | 273 | .test & { |
271 | @include iro-bem-related-element('+', 'subchild3') { | 274 | @include bem.related-elem('+', 'subchild3') { |
272 | font-size: 2em; | 275 | font-size: 2em; |
273 | } | 276 | } |
274 | 277 | ||
275 | @include iro-bem-related-element('~', 'subchild4') { | 278 | @include bem.related-elem('~', 'subchild4') { |
276 | font-size: 2em; | 279 | font-size: 2em; |
277 | } | 280 | } |
278 | } | 281 | } |
@@ -305,14 +308,14 @@ | |||
305 | 308 | ||
306 | @include assert('multiple elements, single related element, modifier in-between') { /// 9 /// | 309 | @include assert('multiple elements, single related element, modifier in-between') { /// 9 /// |
307 | @include output { | 310 | @include output { |
308 | @include iro-bem-block('something') { | 311 | @include bem.block('something') { |
309 | @include iro-bem-element('child1', 'child2') { | 312 | @include bem.elem('child1', 'child2') { |
310 | @include iro-bem-modifier('mod') { | 313 | @include bem.modifier('mod') { |
311 | @include iro-bem-related-element('+', 'subchild1') { | 314 | @include bem.related-elem('+', 'subchild1') { |
312 | font-size: 2.5em; | 315 | font-size: 2.5em; |
313 | } | 316 | } |
314 | 317 | ||
315 | @include iro-bem-related-element('~', 'subchild2') { | 318 | @include bem.related-elem('~', 'subchild2') { |
316 | font-size: 2.5em; | 319 | font-size: 2.5em; |
317 | } | 320 | } |
318 | } | 321 | } |
@@ -335,13 +338,13 @@ | |||
335 | 338 | ||
336 | @include assert('multiple elements, multiple related elements') { /// 10 /// | 339 | @include assert('multiple elements, multiple related elements') { /// 10 /// |
337 | @include output { | 340 | @include output { |
338 | @include iro-bem-block('something') { | 341 | @include bem.block('something') { |
339 | @include iro-bem-element('child1', 'child2') { | 342 | @include bem.elem('child1', 'child2') { |
340 | @include iro-bem-related-element('+', 'subchild1', 'subchild2') { | 343 | @include bem.related-elem('+', 'subchild1', 'subchild2') { |
341 | font-size: 2em; | 344 | font-size: 2em; |
342 | } | 345 | } |
343 | 346 | ||
344 | @include iro-bem-related-element('~', 'subchild3', 'subchild4') { | 347 | @include bem.related-elem('~', 'subchild3', 'subchild4') { |
345 | font-size: 2em; | 348 | font-size: 2em; |
346 | } | 349 | } |
347 | } | 350 | } |
@@ -367,24 +370,24 @@ | |||
367 | 370 | ||
368 | @include assert('multiple elements, multiple related elements, manual selector in-between') { /// 11 /// | 371 | @include assert('multiple elements, multiple related elements, manual selector in-between') { /// 11 /// |
369 | @include output(false) { | 372 | @include output(false) { |
370 | @include iro-bem-block('something') { | 373 | @include bem.block('something') { |
371 | @include iro-bem-element('child1', 'child2') { | 374 | @include bem.elem('child1', 'child2') { |
372 | &:hover { | 375 | &:hover { |
373 | @include iro-bem-related-element('+', 'subchild1', 'subchild2') { | 376 | @include bem.related-elem('+', 'subchild1', 'subchild2') { |
374 | font-size: 2em; | 377 | font-size: 2em; |
375 | } | 378 | } |
376 | 379 | ||
377 | @include iro-bem-related-element('~', 'subchild3', 'subchild4') { | 380 | @include bem.related-elem('~', 'subchild3', 'subchild4') { |
378 | font-size: 2em; | 381 | font-size: 2em; |
379 | } | 382 | } |
380 | } | 383 | } |
381 | 384 | ||
382 | .test & { | 385 | .test & { |
383 | @include iro-bem-related-element('+', 'subchild5', 'subchild6') { | 386 | @include bem.related-elem('+', 'subchild5', 'subchild6') { |
384 | font-size: 2em; | 387 | font-size: 2em; |
385 | } | 388 | } |
386 | 389 | ||
387 | @include iro-bem-related-element('~', 'subchild7', 'subchild8') { | 390 | @include bem.related-elem('~', 'subchild7', 'subchild8') { |
388 | font-size: 2em; | 391 | font-size: 2em; |
389 | } | 392 | } |
390 | } | 393 | } |
@@ -425,14 +428,14 @@ | |||
425 | 428 | ||
426 | @include assert('multiple elements, multiple related elements, modifier in-between') { /// 12 /// | 429 | @include assert('multiple elements, multiple related elements, modifier in-between') { /// 12 /// |
427 | @include output { | 430 | @include output { |
428 | @include iro-bem-block('something') { | 431 | @include bem.block('something') { |
429 | @include iro-bem-element('child1', 'child2') { | 432 | @include bem.elem('child1', 'child2') { |
430 | @include iro-bem-modifier('mod') { | 433 | @include bem.modifier('mod') { |
431 | @include iro-bem-related-element('+', 'subchild1', 'subchild2') { | 434 | @include bem.related-elem('+', 'subchild1', 'subchild2') { |
432 | font-size: 2em; | 435 | font-size: 2em; |
433 | } | 436 | } |
434 | 437 | ||
435 | @include iro-bem-related-element('~', 'subchild3', 'subchild4') { | 438 | @include bem.related-elem('~', 'subchild3', 'subchild4') { |
436 | font-size: 2em; | 439 | font-size: 2em; |
437 | } | 440 | } |
438 | } | 441 | } |
diff --git a/test/bem/_iro-bem-state.scss b/test/bem/_state.scss index 57eb233..674da5f 100644 --- a/test/bem/_iro-bem-state.scss +++ b/test/bem/_state.scss | |||
@@ -1,5 +1,8 @@ | |||
1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations | 1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations |
2 | 2 | ||
3 | @use 'true' as *; | ||
4 | @use '../../src/bem'; | ||
5 | |||
3 | // | 6 | // |
4 | // Included test cases: | 7 | // Included test cases: |
5 | // - /// 1 /// - single block, single state | 8 | // - /// 1 /// - single block, single state |
@@ -10,15 +13,15 @@ | |||
10 | // - /// 6 /// - multiple elements, multiple states | 13 | // - /// 6 /// - multiple elements, multiple states |
11 | // | 14 | // |
12 | 15 | ||
13 | @include it('iro-bem-state') { | 16 | @include it('state') { |
14 | @include assert('single block, single state') { /// 1 /// | 17 | @include assert('single block, single state') { /// 1 /// |
15 | @include output { | 18 | @include output { |
16 | @include iro-bem-block('something') { | 19 | @include bem.block('something') { |
17 | @include iro-bem-is('active') { | 20 | @include bem.is('active') { |
18 | font-size: 1.25em; | 21 | font-size: 1.25em; |
19 | } | 22 | } |
20 | 23 | ||
21 | @include iro-bem-has('state') { | 24 | @include bem.has('state') { |
22 | font-size: 1.75em; | 25 | font-size: 1.75em; |
23 | } | 26 | } |
24 | } | 27 | } |
@@ -37,13 +40,13 @@ | |||
37 | 40 | ||
38 | @include assert('single element, single state') { /// 2 /// | 41 | @include assert('single element, single state') { /// 2 /// |
39 | @include output { | 42 | @include output { |
40 | @include iro-bem-block('something') { | 43 | @include bem.block('something') { |
41 | @include iro-bem-element('child') { | 44 | @include bem.elem('child') { |
42 | @include iro-bem-is('active') { | 45 | @include bem.is('active') { |
43 | font-size: 2.25em; | 46 | font-size: 2.25em; |
44 | } | 47 | } |
45 | 48 | ||
46 | @include iro-bem-has('state') { | 49 | @include bem.has('state') { |
47 | font-size: 2.75em; | 50 | font-size: 2.75em; |
48 | } | 51 | } |
49 | } | 52 | } |
@@ -63,12 +66,12 @@ | |||
63 | 66 | ||
64 | @include assert('single block, multiple states') { /// 3 /// | 67 | @include assert('single block, multiple states') { /// 3 /// |
65 | @include output { | 68 | @include output { |
66 | @include iro-bem-block('something') { | 69 | @include bem.block('something') { |
67 | @include iro-bem-is('active', 'primary') { | 70 | @include bem.is('active', 'primary') { |
68 | font-size: 1.25em; | 71 | font-size: 1.25em; |
69 | } | 72 | } |
70 | 73 | ||
71 | @include iro-bem-has('state', 'indicator') { | 74 | @include bem.has('state', 'indicator') { |
72 | font-size: 1.75em; | 75 | font-size: 1.75em; |
73 | } | 76 | } |
74 | } | 77 | } |
@@ -89,13 +92,13 @@ | |||
89 | 92 | ||
90 | @include assert('single element, multiple states') { /// 4 /// | 93 | @include assert('single element, multiple states') { /// 4 /// |
91 | @include output { | 94 | @include output { |
92 | @include iro-bem-block('something') { | 95 | @include bem.block('something') { |
93 | @include iro-bem-element('child') { | 96 | @include bem.elem('child') { |
94 | @include iro-bem-is('active', 'primary') { | 97 | @include bem.is('active', 'primary') { |
95 | font-size: 2.25em; | 98 | font-size: 2.25em; |
96 | } | 99 | } |
97 | 100 | ||
98 | @include iro-bem-has('state', 'indicator') { | 101 | @include bem.has('state', 'indicator') { |
99 | font-size: 2.75em; | 102 | font-size: 2.75em; |
100 | } | 103 | } |
101 | } | 104 | } |
@@ -117,13 +120,13 @@ | |||
117 | 120 | ||
118 | @include assert('multiple elements, single state') { /// 5 /// | 121 | @include assert('multiple elements, single state') { /// 5 /// |
119 | @include output { | 122 | @include output { |
120 | @include iro-bem-block('something') { | 123 | @include bem.block('something') { |
121 | @include iro-bem-element('child1', 'child2') { | 124 | @include bem.elem('child1', 'child2') { |
122 | @include iro-bem-is('active') { | 125 | @include bem.is('active') { |
123 | font-size: 2.25em; | 126 | font-size: 2.25em; |
124 | } | 127 | } |
125 | 128 | ||
126 | @include iro-bem-has('state') { | 129 | @include bem.has('state') { |
127 | font-size: 2.75em; | 130 | font-size: 2.75em; |
128 | } | 131 | } |
129 | } | 132 | } |
@@ -145,13 +148,13 @@ | |||
145 | 148 | ||
146 | @include assert('multiple elements, multiple states') { /// 6 /// | 149 | @include assert('multiple elements, multiple states') { /// 6 /// |
147 | @include output { | 150 | @include output { |
148 | @include iro-bem-block('something') { | 151 | @include bem.block('something') { |
149 | @include iro-bem-element('child1', 'child2') { | 152 | @include bem.elem('child1', 'child2') { |
150 | @include iro-bem-is('active', 'primary') { | 153 | @include bem.is('active', 'primary') { |
151 | font-size: 2.25em; | 154 | font-size: 2.25em; |
152 | } | 155 | } |
153 | 156 | ||
154 | @include iro-bem-has('state', 'indicator') { | 157 | @include bem.has('state', 'indicator') { |
155 | font-size: 2.75em; | 158 | font-size: 2.75em; |
156 | } | 159 | } |
157 | } | 160 | } |
diff --git a/test/bem/_iro-bem-suffix.scss b/test/bem/_suffix.scss index c6ca787..34f55b6 100644 --- a/test/bem/_iro-bem-suffix.scss +++ b/test/bem/_suffix.scss | |||
@@ -1,5 +1,8 @@ | |||
1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations | 1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations |
2 | 2 | ||
3 | @use 'true' as *; | ||
4 | @use '../../src/bem'; | ||
5 | |||
3 | // | 6 | // |
4 | // Included test cases: | 7 | // Included test cases: |
5 | // - /// 1 /// - block suffix | 8 | // - /// 1 /// - block suffix |
@@ -8,11 +11,11 @@ | |||
8 | // - /// 4 /// - multiple element suffix | 11 | // - /// 4 /// - multiple element suffix |
9 | // | 12 | // |
10 | 13 | ||
11 | @include it('iro-bem-suffix') { | 14 | @include it('suffix') { |
12 | @include assert('block suffix') { /// 1 /// | 15 | @include assert('block suffix') { /// 1 /// |
13 | @include output { | 16 | @include output { |
14 | @include iro-bem-block('something') { | 17 | @include bem.block('something') { |
15 | @include iro-bem-suffix('sm') { | 18 | @include bem.suffix('sm') { |
16 | font-size: 1.5em; | 19 | font-size: 1.5em; |
17 | } | 20 | } |
18 | } | 21 | } |
@@ -27,9 +30,9 @@ | |||
27 | 30 | ||
28 | @include assert('element suffix') { /// 2 /// | 31 | @include assert('element suffix') { /// 2 /// |
29 | @include output { | 32 | @include output { |
30 | @include iro-bem-block('something') { | 33 | @include bem.block('something') { |
31 | @include iro-bem-element('child') { | 34 | @include bem.elem('child') { |
32 | @include iro-bem-suffix('sm') { | 35 | @include bem.suffix('sm') { |
33 | font-size: 2.5em; | 36 | font-size: 2.5em; |
34 | } | 37 | } |
35 | } | 38 | } |
@@ -45,16 +48,16 @@ | |||
45 | 48 | ||
46 | @include assert('modifier suffix') { /// 3 /// | 49 | @include assert('modifier suffix') { /// 3 /// |
47 | @include output { | 50 | @include output { |
48 | @include iro-bem-block('something') { | 51 | @include bem.block('something') { |
49 | @include iro-bem-modifier('mod1') { | 52 | @include bem.modifier('mod1') { |
50 | @include iro-bem-suffix('sm') { | 53 | @include bem.suffix('sm') { |
51 | font-size: 1.75em; | 54 | font-size: 1.75em; |
52 | } | 55 | } |
53 | } | 56 | } |
54 | 57 | ||
55 | @include iro-bem-element('child') { | 58 | @include bem.elem('child') { |
56 | @include iro-bem-modifier('mod2') { | 59 | @include bem.modifier('mod2') { |
57 | @include iro-bem-suffix('sm') { | 60 | @include bem.suffix('sm') { |
58 | font-size: 2.75em; | 61 | font-size: 2.75em; |
59 | } | 62 | } |
60 | } | 63 | } |
@@ -75,9 +78,9 @@ | |||
75 | 78 | ||
76 | @include assert('multiple element suffix') { /// 4 /// | 79 | @include assert('multiple element suffix') { /// 4 /// |
77 | @include output { | 80 | @include output { |
78 | @include iro-bem-block('something') { | 81 | @include bem.block('something') { |
79 | @include iro-bem-element('child1', 'child2') { | 82 | @include bem.elem('child1', 'child2') { |
80 | @include iro-bem-suffix('sm') { | 83 | @include bem.suffix('sm') { |
81 | font-size: 2.5em; | 84 | font-size: 2.5em; |
82 | } | 85 | } |
83 | } | 86 | } |