naive-ui/styles/Badge.scss

47 lines
1.0 KiB
SCSS
Raw Normal View History

2019-08-07 11:40:23 +08:00
@import './mixins/mixins.scss';
@import './themes/vars.scss';
2019-08-07 11:40:23 +08:00
2019-10-08 14:36:04 +08:00
@mixin badge-type-mixin ($type) {
@include m($type + '-type') {
@include b(badge-sup) {
background-color: rgba(9, 133, 91, 1);
}
}
}
2019-08-07 11:40:23 +08:00
@include b(badge) {
display: inline-block;
position: relative;
vertical-align: middle;
2019-10-08 14:36:04 +08:00
@include m(dot) {
@include b(badge-sup) {
2019-08-07 11:40:23 +08:00
height: 8px;
width: 8px;
padding: 0;
min-width: 8px;
left: calc(100% - 4px);
bottom: calc(100% - 4px);
}
}
2019-10-08 14:36:04 +08:00
@include badge-type-mixin('info');
@include badge-type-mixin('success');
@include badge-type-mixin('warning');
@include badge-type-mixin('error');
2019-08-07 11:40:23 +08:00
}
@include b(badge-sup) {
2019-10-08 14:36:04 +08:00
@include fade-in-scale-up-transition(badge, left bottom);
color: white;
2019-08-07 11:40:23 +08:00
user-select: none;
position: absolute;
height: 18px;
line-height: 18px;
border-radius: 9px;
background-color: rgba(186, 45, 67, 1);
2019-08-07 11:40:23 +08:00
padding: 0 6px;
text-align: center;
font-size: 12px;
left: calc(100% - 8px);
bottom: calc(100% - 8px);
font-weight: bold;
}