aboutsummaryrefslogtreecommitdiffstats
path: root/test/bem/_iro-bem-at-theme.scss
blob: d2d0696d4cd20115d1a9fa079034e78fa9a818c3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations

//
// Included test cases:
//  - /// 1 /// - single theme
//  - /// 2 /// - with sub-theme
//

@include it('iro-bem-at-theme') {
    @include assert('single theme') { /// 1 ///
        @include output(false) {
            @include iro-bem-block('something') {
                @include iro-bem-at-theme('theme') {
                    font-size: 2em;
                }
            }
        }

        @include expect(false) {
            .t-theme .something,
            [class*=' t-'] .t-theme .something,
            [class^='t-'] .t-theme .something {
                font-size: 2em;
            }
        }
    }

    @include assert('with sub-theme') { /// 2 ///
        @include output(false) {
            @include iro-bem-block('something') {
                @include iro-bem-at-theme('theme') {
                    font-size: 2em;
                }

                @include iro-bem-at-theme('theme', 'subtheme') {
                    font-size: 3em;
                }
            }
        }

        @include expect(false) {
            .t-theme .something,
            [class*=' t-'] .t-theme .something,
            [class^='t-'] .t-theme .something {
                font-size: 2em;
            }

            .t-theme .t-subtheme .something,
            [class*=' t-'] .t-theme .t-subtheme .something,
            [class^='t-'] .t-theme .t-subtheme .something {
                font-size: 3em;
            }
        }
    }
}