ant-design-blazor/components/transfer/style/index.less

246 lines
5.2 KiB
Plaintext
Raw Normal View History

@import '../../style/themes/index';
@import '../../style/mixins/index';
@import '../../checkbox/style/mixin';
2020-03-23 13:51:37 +08:00
@import './customize';
@transfer-prefix-cls: ~'@{ant-prefix}-transfer';
2020-04-30 10:55:54 +08:00
@transfer-header-vertical-padding: ceil(
2021-01-09 09:07:02 +08:00
((@transfer-header-height - 1px - @font-size-base * @line-height-base) / 2)
2020-04-30 10:55:54 +08:00
);
.@{transfer-prefix-cls} {
2021-01-09 09:07:02 +08:00
.reset-component();
position: relative;
2020-05-31 16:00:40 +08:00
display: flex;
align-items: stretch;
&-disabled {
.@{transfer-prefix-cls}-list {
background: @transfer-disabled-bg;
}
}
&-list {
2020-05-31 16:00:40 +08:00
display: flex;
flex-direction: column;
width: 180px;
height: @transfer-list-height;
border: @border-width-base @border-style-base @border-color-base;
border-radius: @border-radius-base;
2020-05-31 16:00:40 +08:00
&-with-pagination {
width: 250px;
height: auto;
}
&-search {
2020-05-11 21:47:35 +08:00
padding-right: 24px;
padding-left: @control-padding-horizontal-sm;
&-action {
position: absolute;
2020-03-30 09:53:10 +08:00
top: @transfer-list-search-icon-top;
right: 12px;
bottom: 12px;
width: 28px;
color: @disabled-color;
line-height: @input-height-base;
text-align: center;
.@{iconfont-css-prefix} {
color: @disabled-color;
transition: all 0.3s;
&:hover {
color: @text-color-secondary;
}
}
span& {
pointer-events: none;
}
}
}
&-header {
2020-05-31 16:00:40 +08:00
display: flex;
flex: none;
align-items: center;
height: @transfer-header-height;
// border-top is on the transfer dom. We should minus 1px for this
padding: (@transfer-header-vertical-padding - 1px) @control-padding-horizontal
@transfer-header-vertical-padding;
color: @text-color;
background: @component-background;
border-bottom: @border-width-base @border-style-base @border-color-split;
border-radius: @border-radius-base @border-radius-base 0 0;
2020-05-31 16:00:40 +08:00
> *:not(:last-child) {
margin-right: 4px;
}
> * {
flex: none;
}
&-title {
2020-05-31 16:00:40 +08:00
flex: auto;
overflow: hidden;
white-space: nowrap;
text-align: right;
text-overflow: ellipsis;
}
2020-05-31 16:00:40 +08:00
&-dropdown {
2020-10-25 23:07:27 +08:00
font-size: 10px;
2020-05-31 16:00:40 +08:00
transform: translateY(10%);
cursor: pointer;
2020-08-10 11:28:52 +08:00
&[disabled] {
cursor: not-allowed;
}
}
}
&-body {
2020-05-31 16:00:40 +08:00
display: flex;
flex: auto;
flex-direction: column;
overflow: hidden;
font-size: @font-size-base;
&-search-wrapper {
2020-05-31 16:00:40 +08:00
position: relative;
flex: none;
2020-03-30 09:53:10 +08:00
padding: @padding-sm;
}
}
&-content {
2020-05-31 16:00:40 +08:00
flex: auto;
margin: 0;
padding: 0;
overflow: auto;
list-style: none;
2021-03-29 23:41:54 +08:00
&-item {
2020-05-31 16:00:40 +08:00
display: flex;
align-items: center;
2020-03-30 09:53:10 +08:00
min-height: @transfer-item-height;
padding: @transfer-item-padding-vertical @control-padding-horizontal;
2020-04-30 10:55:54 +08:00
line-height: @transfer-item-height - 2 * @transfer-item-padding-vertical;
transition: all 0.3s;
2020-05-31 16:00:40 +08:00
> *:not(:last-child) {
margin-right: 8px;
}
2020-05-31 16:00:40 +08:00
> * {
flex: none;
}
&-text {
2020-05-31 16:00:40 +08:00
flex: auto;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
&-remove {
.operation-unit();
position: relative;
color: @border-color-base;
&::after {
position: absolute;
top: -@transfer-item-padding-vertical;
right: -50%;
bottom: -@transfer-item-padding-vertical;
left: -50%;
content: '';
}
&:hover {
color: @link-hover-color;
}
}
}
2020-05-31 16:00:40 +08:00
&-item:not(&-item-disabled) {
&:hover {
background-color: @transfer-item-hover-bg;
cursor: pointer;
}
&.@{transfer-prefix-cls}-list-content-item-checked:hover {
background-color: darken(@item-active-bg, 2%);
}
}
// Do not change hover style when `oneWay` mode
&-show-remove &-item:not(&-item-disabled):hover {
background: transparent;
cursor: default;
}
&-item-checked {
background-color: @item-active-bg;
}
&-item-disabled {
color: @btn-disable-color;
cursor: not-allowed;
}
}
2020-05-31 16:00:40 +08:00
&-pagination {
padding: @padding-xs 0;
2020-08-23 16:06:08 +08:00
text-align: right;
border-top: @border-width-base @border-style-base @border-color-split;
2020-05-31 16:00:40 +08:00
}
&-body-not-found {
2020-05-31 16:00:40 +08:00
flex: none;
width: 100%;
2020-05-31 16:00:40 +08:00
margin: auto 0;
color: @disabled-color;
text-align: center;
}
&-footer {
border-top: @border-width-base @border-style-base @border-color-split;
}
2021-03-29 23:41:54 +08:00
&-checkbox .@{ant-prefix}-checkbox {
top: 0;
}
}
&-operation {
2020-05-31 16:00:40 +08:00
display: flex;
flex: none;
flex-direction: column;
align-self: center;
margin: 0 8px;
overflow: hidden;
vertical-align: middle;
.@{ant-prefix}-btn {
display: block;
&:first-child {
margin-bottom: 4px;
}
.@{iconfont-css-prefix} {
font-size: 12px;
}
}
}
2020-04-30 10:55:54 +08:00
.@{ant-prefix}-empty-image {
2021-01-09 09:07:02 +08:00
max-height: (@transfer-header-height / 2) - 22;
2020-04-30 10:55:54 +08:00
}
}
2020-03-23 13:51:37 +08:00
@import './rtl';