ant-design/components/transfer/style/index.less
二货机器人 36bcaaef85
Add variable.less to support css variable (#31496)
* chore: use varaible.less

* chore: basic primary varaible

* chore: Move to variable

* chore: align active color

* chore: global fix of css variable

* chore: primary colors

* chore: button danger

* chore: btn default error color

* chore: button series

* chore: More examples

* chore: More components

* chore: Form demo

* chore: form style

* fix: Tag & Alert variable

* chore: update footer

* chore: rm tmp code

* chore: transfer

* fix: picker column active color

* chore: Adjust active bg color

* chore: table hover color

* chore: all css variables

* chore: Global using variables

* chore: Test case

* chore: Update test logic

* chore: back of default less

* chore: entry of site use proxy style

* chore: update entry

* chore: split of variables

* refactor: quick dist speed

* fix: site use variable version

* chore: Update less config

* chore: add mv script

* chore: Update repalcement script

* chore: Add inject variables

* chore: Update script

* fix: script path

* chore: Move to component instead

* chore: fix condition

* chore: update config

* chore: Update in less transform

* chore: Modify logic

* chore: change to variables

* chore: Update name

* fix: script name

* chore: do inject

* revert: back of path

* chore: 2 way of generate

* bump tools

* chore: Add auto replacement script

* chore: auto genrate less file

* chore: fix test

* test: More test case

* chore: Update limit config

* test: coverage

* docs: Update doc
2021-09-01 10:56:50 +08:00

221 lines
4.7 KiB
Plaintext

@import '../../style/themes/index';
@import '../../style/mixins/index';
@import '../../checkbox/style/mixin';
@import './customize';
@transfer-prefix-cls: ~'@{ant-prefix}-transfer';
@transfer-header-vertical-padding: ceil(
((@transfer-header-height - 1px - @font-size-base * @line-height-base) / 2)
);
.@{transfer-prefix-cls} {
.reset-component();
position: relative;
display: flex;
align-items: stretch;
&-disabled {
.@{transfer-prefix-cls}-list {
background: @transfer-disabled-bg;
}
}
&-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;
&-with-pagination {
width: 250px;
height: auto;
}
&-search {
.anticon-search {
color: @disabled-color;
}
}
&-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;
> *:not(:last-child) {
margin-right: 4px;
}
> * {
flex: none;
}
&-title {
flex: auto;
overflow: hidden;
white-space: nowrap;
text-align: right;
text-overflow: ellipsis;
}
&-dropdown {
font-size: 10px;
transform: translateY(10%);
cursor: pointer;
&[disabled] {
cursor: not-allowed;
}
}
}
&-body {
display: flex;
flex: auto;
flex-direction: column;
overflow: hidden;
font-size: @font-size-base;
&-search-wrapper {
position: relative;
flex: none;
padding: @padding-sm;
}
}
&-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;
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: @transfer-item-selected-hover-bg;
}
}
// 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;
}
&-body-not-found {
flex: none;
width: 100%;
margin: auto 0;
color: @disabled-color;
text-align: center;
}
&-footer {
border-top: @border-width-base @border-style-base @border-color-split;
}
}
&-operation {
display: flex;
flex: none;
flex-direction: column;
align-self: center;
margin: 0 8px;
vertical-align: middle;
.@{ant-prefix}-btn {
display: block;
&:first-child {
margin-bottom: 4px;
}
.@{iconfont-css-prefix} {
font-size: 12px;
}
}
}
.@{ant-prefix}-empty-image {
max-height: (@transfer-header-height / 2) - 22;
}
}
@import './rtl';