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/_at-theme.scss | |
| 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/_at-theme.scss')
| -rw-r--r-- | test/bem/_at-theme.scss | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/test/bem/_at-theme.scss b/test/bem/_at-theme.scss new file mode 100644 index 0000000..29a4eba --- /dev/null +++ b/test/bem/_at-theme.scss | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | // sass-lint:disable class-name-format force-element-nesting force-pseudo-nesting mixins-before-declarations | ||
| 2 | |||
| 3 | @use 'true' as *; | ||
| 4 | @use '../../src/bem'; | ||
| 5 | |||
| 6 | // | ||
| 7 | // Included test cases: | ||
| 8 | // - /// 1 /// - single theme | ||
| 9 | // - /// 2 /// - with sub-theme | ||
| 10 | // | ||
| 11 | |||
| 12 | @include it('at-theme') { | ||
| 13 | @include assert('single theme') { /// 1 /// | ||
| 14 | @include output(false) { | ||
| 15 | @include bem.block('something') { | ||
| 16 | @include bem.at-theme('theme') { | ||
| 17 | font-size: 2em; | ||
| 18 | } | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | @include expect(false) { | ||
| 23 | .t-theme .something, | ||
| 24 | [class*=' t-'] .t-theme .something, | ||
| 25 | [class^='t-'] .t-theme .something { | ||
| 26 | font-size: 2em; | ||
| 27 | } | ||
| 28 | } | ||
| 29 | } | ||
| 30 | |||
| 31 | @include assert('with sub-theme') { /// 2 /// | ||
| 32 | @include output(false) { | ||
| 33 | @include bem.block('something') { | ||
| 34 | @include bem.at-theme('theme') { | ||
| 35 | font-size: 2em; | ||
| 36 | } | ||
| 37 | |||
| 38 | @include bem.at-theme('theme', 'subtheme') { | ||
| 39 | font-size: 3em; | ||
| 40 | } | ||
| 41 | } | ||
| 42 | } | ||
| 43 | |||
| 44 | @include expect(false) { | ||
| 45 | .t-theme .something, | ||
| 46 | [class*=' t-'] .t-theme .something, | ||
| 47 | [class^='t-'] .t-theme .something { | ||
| 48 | font-size: 2em; | ||
| 49 | } | ||
| 50 | |||
| 51 | .t-theme .t-subtheme .something, | ||
| 52 | [class*=' t-'] .t-theme .t-subtheme .something, | ||
| 53 | [class^='t-'] .t-theme .t-subtheme .something { | ||
| 54 | font-size: 3em; | ||
| 55 | } | ||
| 56 | } | ||
| 57 | } | ||
| 58 | } | ||
