naive-ui/styles/mixins/mixins.scss
2019-09-03 19:18:16 +08:00

46 lines
688 B
SCSS

@import "./config.scss";
$B: null;
$BE: null;
$BEM: null;
@mixin b($block) {
$temp-block: $B;
$temp-block-element: $BE;
$B: $namespace + "-" + $block !global;
$BE: $B!global;
.#{$B} {
@content;
}
$B: $temp-block !global;
$BE: $temp-block-element !global;
}
@mixin e($element) {
$temp-block-element: $BE;
$BE: $B + "__" + $element !global;
.#{$BE} {
@content
}
$BE: $temp-block-element !global;
}
@mixin m($modifier) {
$BEM: $BE + '--' + $modifier;
&.#{$BEM} {
@content
}
}
@mixin detachedContentWrapper {
position: fixed;
left: 0;
top: 0;
width: 0;
height: 0;
overflow: visible;
}
@mixin detachedContent {
position: fixed;
}