aboutsummaryrefslogtreecommitdiffstats
path: root/test/bem/_iro-bem-suffix.scss
diff options
context:
space:
mode:
Diffstat (limited to 'test/bem/_iro-bem-suffix.scss')
-rw-r--r--test/bem/_iro-bem-suffix.scss94
1 files changed, 94 insertions, 0 deletions
diff --git a/test/bem/_iro-bem-suffix.scss b/test/bem/_iro-bem-suffix.scss
new file mode 100644
index 0000000..c6ca787
--- /dev/null
+++ b/test/bem/_iro-bem-suffix.scss
@@ -0,0 +1,94 @@
1// sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations
2
3//
4// Included test cases:
5// - /// 1 /// - block suffix
6// - /// 2 /// - element suffix
7// - /// 3 /// - modifier suffix
8// - /// 4 /// - multiple element suffix
9//
10
11@include it('iro-bem-suffix') {
12 @include assert('block suffix') { /// 1 ///
13 @include output {
14 @include iro-bem-block('something') {
15 @include iro-bem-suffix('sm') {
16 font-size: 1.5em;
17 }
18 }
19 }
20
21 @include expect {
22 .something\@sm {
23 font-size: 1.5em;
24 }
25 }
26 }
27
28 @include assert('element suffix') { /// 2 ///
29 @include output {
30 @include iro-bem-block('something') {
31 @include iro-bem-element('child') {
32 @include iro-bem-suffix('sm') {
33 font-size: 2.5em;
34 }
35 }
36 }
37 }
38
39 @include expect {
40 .something__child\@sm {
41 font-size: 2.5em;
42 }
43 }
44 }
45
46 @include assert('modifier suffix') { /// 3 ///
47 @include output {
48 @include iro-bem-block('something') {
49 @include iro-bem-modifier('mod1') {
50 @include iro-bem-suffix('sm') {
51 font-size: 1.75em;
52 }
53 }
54
55 @include iro-bem-element('child') {
56 @include iro-bem-modifier('mod2') {
57 @include iro-bem-suffix('sm') {
58 font-size: 2.75em;
59 }
60 }
61 }
62 }
63 }
64
65 @include expect {
66 .something--mod1\@sm {
67 font-size: 1.75em;
68 }
69
70 .something__child--mod2\@sm {
71 font-size: 2.75em;
72 }
73 }
74 }
75
76 @include assert('multiple element suffix') { /// 4 ///
77 @include output {
78 @include iro-bem-block('something') {
79 @include iro-bem-element('child1', 'child2') {
80 @include iro-bem-suffix('sm') {
81 font-size: 2.5em;
82 }
83 }
84 }
85 }
86
87 @include expect {
88 .something__child1\@sm,
89 .something__child2\@sm {
90 font-size: 2.5em;
91 }
92 }
93 }
94}