Sha256: 591afc5a774ffb978addbf9c774292e94e3686e5159f10f0be05b0d3f36d64e4
Contents?: true
Size: 1.02 KB
Versions: 6
Compression:
Stored size: 1.02 KB
Contents
// ----------------------------------------------------------------------------- // Theme constructor // ----------------------------------------------------------------------------- $bem-theme-namespace: 't' !default; @function _theme($themes...) { // If you try to hack a hack you can break the internet. // So please, no one try it. $outside-check: _should-not-be-called-within('theme'); // Return false in case error throwing is disabled @if $outside-check == false { @return false; } $selector: (); $namespace: if($bem-use-namespaces, $bem-theme-namespace + '-', ''); @each $theme in $themes { @each $sel in & { $t: selector-nest('.#{$namespace}#{$theme}', $sel); $selector: append($selector, $t, 'comma'); } } $set-current: set-current-context('theme', $themes, $selector); @return $selector; } @mixin theme($themes...) { @at-root #{_theme($themes...)} { @content; } $unset-current: unset-current-context('theme'); }
Version data entries
6 entries across 6 versions & 1 rubygems