naive-ui/styles/BaseSuffix.scss
songwanli2025@163.com fdf2af8eb5 merge
2020-02-24 16:25:02 +08:00

132 lines
3.6 KiB
SCSS

@import './mixins/mixins.scss';
@include themes-mixin {
@include b(base-suffix) {
@include once {
@include fade-in-scale-up-transition(base-suffix);
user-select: none;
display: inline-block;
position: relative;
height: 12px;
width: 12px;
vertical-align: bottom;
}
@include b(base-suffix-spin) {
@include icon-switch-transition();
transform: $--n-transform-debounce-scale;
position: absolute;
height: 12px;
width: 12px;
}
@include b(base-suffix-cross) {
@include once {
@include icon-switch-transition();
transform: $--n-transform-debounce-scale;
position: absolute;
height: 12px;
width: 12px;
line-height: 12px;
border-radius: 8px;
overflow: hidden;
cursor: pointer;
}
@include e(icon) {
@include once {
transition: fill .3s $--n-ease-in-out-cubic-bezier;
}
fill: map-get($--base-suffix-cross-color, "default");
}
@include m(arrow) {
@include e(icon) {
fill: map-get($--base-suffix-cross-color, "hover");
}
}
&:hover {
@include e(icon) {
fill: map-get($--base-suffix-cross-color, "hover");
}
}
&:active {
@include e(icon) {
fill: map-get($--base-suffix-cross-color, "active");
}
}
}
@include b(base-suffix-arrow) {
@include once {
@include icon-switch-transition();
transform: $--n-transform-debounce-scale;
position: absolute;
top: 0;
left: 0;
width: 12px;
height: 12px;
border-radius: 8px;
overflow: hidden;
cursor: pointer;
}
&::after {
@include once {
transition:
transform .3s $--n-ease-in-out-cubic-bezier,
border-color .3s $--n-ease-in-out-cubic-bezier;
position: absolute;
content: '';
box-sizing: border-box;
width: 7px;
height: 7px;
right: 1px;
top: calc(50% - 4.5px);
transform: rotate(-45deg);
transform-origin: 30% 70%;
}
border-left: 1px solid map-get($--base-suffix-arrow-color, 'default');
border-bottom: 1px solid map-get($--base-suffix-arrow-color, 'default');
}
@include m(active) {
&::after {
@include once {
transform: rotate(135deg);
}
border-left: 1px solid map-get($--base-suffix-arrow-color, 'active');
border-bottom: 1px solid map-get($--base-suffix-arrow-color, 'active');
}
}
@include m(disabled) {
@include once {
cursor: not-allowed;
}
}
}
}
@include as-form-item {
@include with-status(error) {
@include b(base-suffix-cross) {
@include m(arrow) {
@include e(icon) {
fill: map-get($--base-suffix-cross-color, "error-hover");
}
}
&:hover {
@include e(icon) {
fill: map-get($--base-suffix-cross-color, "error-hover");
}
}
&:active {
@include e(icon) {
fill: map-get($--base-suffix-cross-color, "error-active");
}
}
}
@include b(base-suffix-arrow) {
@include m(active) {
&::after {
border-left: 1px solid map-get($--base-suffix-arrow-color, 'error-active');
border-bottom: 1px solid map-get($--base-suffix-arrow-color, 'error-active');
}
}
}
}
}
}