naive-ui/styles/Tag.scss

108 lines
2.5 KiB
SCSS
Raw Normal View History

2019-08-07 14:21:15 +08:00
@import './mixins/mixins.scss';
@import './theme/default.scss';
@include b(tag) {
position: relative;
line-height: 28px;
height: 28px;
font-size: 14px;
padding: 0 7px;
border-radius: 4px;
box-sizing: border-box;
cursor: pointer;
2019-08-19 19:30:01 +08:00
display: inline-block;
2019-08-12 14:30:08 +08:00
transition: background-color .3s $default-cubic-bezier;
2019-08-07 14:21:15 +08:00
&.n-tag--closable {
padding-right: 18px;
.n-tag__close-mark {
2019-08-12 14:30:08 +08:00
transition: color .3s $default-cubic-bezier;
2019-08-07 14:21:15 +08:00
right: 3px;
top: 50%;
transform: translateY(-50%);
height: 14px;
width: 14px;
line-height: 14px;
position: absolute;
}
}
2019-08-12 14:30:08 +08:00
& {
box-shadow: inset 0 0 0 1px rgba(99,226,183,1);
color: rgba(99, 226, 183, 1);
.n-tag__close-mark {
color: rgba(99, 226, 183, 0.5);
&:hover {
color: rgba(99, 226, 183, 1);
}
}
&:hover {
background-color: rgba(99, 226, 183, 0.3);
}
&:active {
background-color: rgba(99, 226, 183, 0.2);
}
}
2019-08-07 14:21:15 +08:00
&.n-tag--success-type {
box-shadow: inset 0 0 0 1px rgba(99, 226, 183, 1);
color: rgba(99, 226, 183, 1);
2019-08-12 14:30:08 +08:00
.n-tag__close-mark {
color: rgba(99, 226, 183, 0.5);
&:hover {
color: rgba(99, 226, 183, 1);
}
}
&:hover {
background-color: rgba(99, 226, 183, 0.3);
}
&:active {
background-color: rgba(99, 226, 183, 0.2);
}
2019-08-07 14:21:15 +08:00
}
&.n-tag--info-type {
box-shadow: inset 0 0 0 1px rgba(98, 187, 252, 1);
color: rgba(98, 187, 252, 1);
2019-08-12 14:30:08 +08:00
.n-tag__close-mark {
color: rgba(98, 187, 252, 0.5);
&:hover {
color: rgba(98, 187, 252, 1);
}
}
&:hover {
background-color: rgba(98, 187, 252, 0.3);
}
&:active {
background-color: rgba(98, 187, 252, 0.2);
}
2019-08-07 14:21:15 +08:00
}
&.n-tag--warning-type {
box-shadow: inset 0 0 0 1px rgba(245, 166, 35, 1);
color: rgba(245, 166, 35, 1);
2019-08-12 14:30:08 +08:00
.n-tag__close-mark {
color: rgba(245, 166, 35, 0.5);
&:hover {
color: rgba(245, 166, 35, 1);
}
}
&:hover {
background-color: rgba(245, 166, 35, 0.3);
}
&:active {
background-color: rgba(245, 166, 35, 0.2);
}
2019-08-07 14:21:15 +08:00
}
&.n-tag--error-type {
box-shadow: inset 0 0 0 1px rgba(255, 146, 164, 1);
2019-08-12 14:30:08 +08:00
color: rgba(255, 146, 164, 1);
.n-tag__close-mark {
color: rgba(255, 146, 164, 0.5);
&:hover {
color: rgba(255, 146, 164, 1);
}
}
&:hover {
background-color: rgba(255, 146, 164, 0.3);
}
&:active {
background-color: rgba(255, 146, 164, 0.2);
}
2019-08-07 14:21:15 +08:00
}
}