naive-ui/styles/Badge.scss

54 lines
1.1 KiB
SCSS
Raw Normal View History

2019-08-07 11:40:23 +08:00
@import './mixins/mixins.scss';
@import './theme/default.scss';
@include b(badge) {
display: inline-block;
position: relative;
vertical-align: middle;
&.n-badge--dot {
.n-badge-sup {
height: 8px;
width: 8px;
padding: 0;
min-width: 8px;
left: calc(100% - 4px);
bottom: calc(100% - 4px);
}
}
&.n-badge--success-type {
.n-badge-sup {
background-color: rgba(9, 133, 91, 1);
2019-08-07 11:40:23 +08:00
}
}
&.n-badge--info-type {
.n-badge-sup {
background-color: rgba(56, 137, 197, 1);
2019-08-07 11:40:23 +08:00
}
}
&.n-badge--warning-type {
.n-badge-sup {
2019-08-08 18:00:30 +08:00
background-color: rgba(205, 135, 20, 1);
2019-08-07 11:40:23 +08:00
}
}
&.n-badge--error-type {
.n-badge-sup {
2019-08-08 18:00:30 +08:00
background-color: rgba(255, 109, 147, 1);
2019-08-07 11:40:23 +08:00
}
}
}
@include b(badge-sup) {
2019-08-14 19:29:50 +08:00
@include fade-in-scale-up-transition(badge);
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;
}