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 {
color: rgba(75, 81, 106, 1);
background-color: rgba(99, 226, 183, 1);
}
}
&.n-badge--info-type {
.n-badge-sup {
background-color: rgba(98, 187, 252, 1);
}
}
&.n-badge--warning-type {
.n-badge-sup {
background-color: rgba(255, 138, 0, 1);
}
}
&.n-badge--error-type {
.n-badge-sup {
background-color: rgba(255, 146, 164, 1);
}
}
}
@include b(badge-sup) {
user-select: none;
position: absolute;
height: 18px;
line-height: 18px;
border-radius: 9px;
background-color: rgba(237, 73, 99, 1);
padding: 0 6px;
text-align: center;
font-size: 12px;
left: calc(100% - 8px);
bottom: calc(100% - 8px);
font-weight: bold;
}