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

221 lines
4.7 KiB
Plaintext
Raw Normal View History

@import '../../style/themes/index';
2018-12-07 16:17:45 +08:00
@import '../../style/mixins/index';
@import '../../checkbox/style/mixin';
@import './customize';
2018-12-07 16:17:45 +08:00
@transfer-prefix-cls: ~'@{ant-prefix}-transfer';
2015-11-25 23:17:06 +08:00
@transfer-header-vertical-padding: ceil(
((@transfer-header-height - 1px - @font-size-base * @line-height-base) / 2)
);
.@{transfer-prefix-cls} {
.reset-component();
2019-04-15 10:52:00 +08:00
2015-12-23 22:59:42 +08:00
position: relative;
display: flex;
align-items: stretch;
2015-12-23 22:59:42 +08:00
2018-09-15 15:18:59 +08:00
&-disabled {
.@{transfer-prefix-cls}-list {
background: @transfer-disabled-bg;
}
}
2015-11-25 23:17:06 +08:00
&-list {
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;
2015-12-24 17:44:54 +08:00
&-with-pagination {
width: 250px;
height: auto;
2015-12-24 17:44:54 +08:00
}
2015-11-25 23:17:06 +08:00
2015-12-17 16:08:16 +08:00
&-search {
.anticon-search {
color: @disabled-color;
2015-12-17 16:08:16 +08:00
}
}
2015-11-25 23:17:06 +08:00
&-header {
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;
2015-12-16 23:02:49 +08:00
> *:not(:last-child) {
margin-right: 4px;
}
> * {
flex: none;
}
2015-12-16 23:02:49 +08:00
&-title {
flex: auto;
overflow: hidden;
white-space: nowrap;
text-align: right;
text-overflow: ellipsis;
2015-12-16 23:02:49 +08:00
}
&-dropdown {
font-size: 10px;
transform: translateY(10%);
cursor: pointer;
&[disabled] {
cursor: not-allowed;
}
}
2015-11-25 23:17:06 +08:00
}
&-body {
display: flex;
flex: auto;
flex-direction: column;
overflow: hidden;
font-size: @font-size-base;
2015-12-16 23:02:49 +08:00
&-search-wrapper {
position: relative;
flex: none;
padding: @padding-sm;
2015-12-21 15:29:02 +08:00
}
2015-12-29 15:48:22 +08:00
}
&-content {
flex: auto;
margin: 0;
padding: 0;
overflow: auto;
list-style: none;
&-item {
display: flex;
align-items: center;
min-height: @transfer-item-height;
padding: @transfer-item-padding-vertical @control-padding-horizontal;
line-height: @transfer-item-height - 2 * @transfer-item-padding-vertical;
2018-12-07 16:17:45 +08:00
transition: all 0.3s;
> *:not(:last-child) {
margin-right: 8px;
}
> * {
flex: none;
}
&-text {
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;
}
}
}
&-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;
}
}
&-pagination {
padding: @padding-xs 0;
text-align: right;
border-top: @border-width-base @border-style-base @border-color-split;
}
2016-11-24 17:21:49 +08:00
&-body-not-found {
flex: none;
2016-11-24 17:21:49 +08:00
width: 100%;
margin: auto 0;
color: @disabled-color;
text-align: center;
2016-11-24 17:21:49 +08:00
}
2015-11-25 23:17:06 +08:00
&-footer {
border-top: @border-width-base @border-style-base @border-color-split;
2015-11-25 23:17:06 +08:00
}
}
2015-12-16 23:02:49 +08:00
&-operation {
display: flex;
flex: none;
flex-direction: column;
align-self: center;
2015-12-23 22:59:42 +08:00
margin: 0 8px;
2015-12-24 15:52:49 +08:00
vertical-align: middle;
2015-12-16 23:02:49 +08:00
.@{ant-prefix}-btn {
2016-10-06 19:10:01 +08:00
display: block;
2015-12-23 22:59:42 +08:00
2015-12-24 15:52:49 +08:00
&:first-child {
margin-bottom: 4px;
}
.@{iconfont-css-prefix} {
font-size: 12px;
2015-12-23 22:59:42 +08:00
}
2015-12-16 23:02:49 +08:00
}
}
.@{ant-prefix}-empty-image {
max-height: (@transfer-header-height / 2) - 22;
}
2015-11-25 23:17:06 +08:00
}
@import './rtl';