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

229 lines
5.2 KiB
Plaintext
Raw Normal View History

meger feature to master (#16421) * use ul in list * update snapshot * update comment * feat: TreeSelect support `showSearch` in multiple mode (#15933) * update rc-tree-select * typo * update desc & snapshot * update desc & snapshot * check default showSearch * feat: table customizing variable (#15971) * feat: added table selected row color variable * fix: @table-selected-row-color default is inherit * feat: Upload support customize previewFile (#15984) * support preview file * use promise * dealy load * use canvas of render * use domHook of test * update demo * add snapshot * update types * update testcase * feat: form customizing variables (#15954) * fix: added styling form input background-color * feat: added '@form-warning-input-bg' variable * feat: added '@form-error-input-bg' variable * use li wrap with comment * feat: Support append theme less file with less-variable (#16118) * add override * add override support * update doc * feat: dropdown support set right icon * docs: update doc of dropdown component * style: format dropdown-button.md * test: update updateSnapshot * style: format dropdown-button.md * test: update updateSnapshot * test: update updateSnapshot * style: change style of dropdown-button demo * fix: fix document table order * feat: Support SkeletonAvatarProps.size accept number (#16078) (#16128) * chore:update style of demo * feat: Notification functions accept top, bottom and getContainer as arguments * drawer: add afterVisibleChange * rm onVisibleChange * update * feat: 🇭🇷 hr_HR locale (#16258) * Added Croatian locale * fixed lint error * :white_check_mark: Add test cases for hr_HR * :memo: update i18n documentation * feat: add `htmlFor` in Form.Item (#16278) * add htmlFor in Form.Item * update doc * feat: Button support `link` type (#16289) close #15892 * feat: Add Timeline.Item.position (#16148) (#16193) * fix: Timeline.pendingDot interface documentation there is a small problem (#16177) * feat: Add Timeline.Item.position (#16148) * doc: add version infomation for Timeline.Item.position * refactor: Update Tree & TreeSelect deps (#16330) * use CSSMotion * update snapshot * feat: Collapse support `expandIconPosition` (#16365) * update doc * support expandIconPosition * update snapshot * feat: Breadcrumb support DropDown (#16315) * breadcrumbs support drop down menu * update doc * add require less * fix test * fix md doc * less code * fix style warning * update snap * add children render test * feat: TreeNode support checkable * feat: add optional to support top and left slick dots (#16186) (#16225) * add optional to support top and left slick dots * update carousel snapshot * Update doc, add placement demo * update carousel placement demo snapshots * rename dots placement to position * update vertical as deprecated * rename dotsPosition to dotPosition * refine code * add warning testcase for vertical * remove unused warning * update expression * Additional test case for dotPosition * refactor: Upgrade `rc-tree-select` to support pure React motion (#16402) * upgrade `rc-tree-select` * update snapshot * 3.17.0 changelog * fix warning * fix review warning
2019-05-06 12:04:39 +08:00
@import '../../style/themes/index';
2018-12-07 20:02:01 +08:00
@import '../../style/mixins/index';
@import '../../input/style/mixin';
2015-12-02 14:59:48 +08:00
@import './single';
@import './multiple';
@select-prefix-cls: ~'@{ant-prefix}-select';
@select-height-without-border: @input-height-base - 2 * @border-width-base;
2019-04-15 10:52:00 +08:00
.select-selector() {
2015-06-09 21:16:59 +08:00
position: relative;
2019-11-06 11:23:40 +08:00
background-color: @select-background;
border: @border-width-base @border-style-base @select-border-color;
border-radius: @border-radius-base;
transition: all 0.3s @ease-in-out;
2015-07-09 17:47:21 +08:00
input {
cursor: pointer;
2015-06-09 21:16:59 +08:00
}
.@{select-prefix-cls}-show-search& {
input {
cursor: auto;
}
2015-06-11 19:23:35 +08:00
}
.@{select-prefix-cls}-focused& {
.active();
}
2015-06-11 19:23:35 +08:00
.@{select-prefix-cls}-disabled& {
color: @disabled-color;
background: @input-disabled-bg;
cursor: not-allowed;
2015-06-15 19:29:32 +08:00
input {
cursor: not-allowed;
2015-08-08 19:11:10 +08:00
}
}
}
2015-08-08 19:11:10 +08:00
/* Reset search input style */
.select-search-input-without-border() {
.@{select-prefix-cls}-selection-search-input {
background: transparent;
border: none;
outline: none;
2015-08-08 19:11:10 +08:00
}
}
2015-08-08 19:11:10 +08:00
.@{select-prefix-cls} {
.reset-component;
2015-07-14 20:16:05 +08:00
position: relative;
display: inline-block;
// ======================== Selection ========================
&-selection-item {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
// ======================= Placeholder =======================
&-selection-placeholder {
opacity: 0.4;
}
// ========================== Arrow ==========================
&-arrow {
.iconfont-mixin();
position: absolute;
top: 53%;
right: @control-padding-horizontal - 1px;
width: @font-size-sm;
height: @font-size-sm;
margin-top: -@font-size-sm / 2;
color: @disabled-color;
font-size: @font-size-sm;
line-height: 1;
text-align: center;
// transform-origin: 50% 50%;
pointer-events: none;
2016-05-27 15:00:22 +08:00
.anticon {
transition: transform 0.3s;
.@{select-prefix-cls}-open &.anticon-down {
transform: rotate(180deg);
}
2015-07-14 20:16:05 +08:00
}
}
// ========================== Clear ==========================
&-clear {
position: absolute;
top: 50%;
right: @control-padding-horizontal - 1px;
z-index: 1;
display: inline-block;
width: @font-size-sm;
height: @font-size-sm;
margin-top: -@font-size-sm / 2;
color: @disabled-color;
font-size: @font-size-sm;
font-style: normal;
line-height: 1;
text-align: center;
text-transform: none;
2019-11-06 10:34:53 +08:00
background: @select-background;
cursor: pointer;
opacity: 0;
transition: color 0.3s ease, opacity 0.15s ease;
text-rendering: auto;
&::before {
display: block;
2015-07-15 19:59:54 +08:00
}
&:hover {
color: @text-color-secondary;
}
.@{select-prefix-cls}:hover & {
opacity: 1;
}
}
// ========================== Popup ==========================
&-dropdown {
.reset-component;
2015-06-15 19:29:32 +08:00
position: absolute;
top: -9999px;
left: -9999px;
z-index: @zindex-dropdown;
box-sizing: border-box;
overflow: hidden;
font-size: @font-size-base;
// Fix select render lag of long text in chrome
// https://github.com/ant-design/ant-design/issues/11456
// https://github.com/ant-design/ant-design/issues/11843
font-variant: initial;
background-color: @select-dropdown-bg;
border-radius: @border-radius-base;
outline: none;
box-shadow: @box-shadow-base;
&.slide-up-enter.slide-up-enter-active&-placement-bottomLeft,
&.slide-up-appear.slide-up-appear-active&-placement-bottomLeft {
animation-name: antSlideUpIn;
2015-06-09 21:16:59 +08:00
}
&.slide-up-enter.slide-up-enter-active&-placement-topLeft,
&.slide-up-appear.slide-up-appear-active&-placement-topLeft {
animation-name: antSlideDownIn;
2015-06-09 21:16:59 +08:00
}
&.slide-up-leave.slide-up-leave-active&-placement-bottomLeft {
animation-name: antSlideUpOut;
}
&.slide-up-leave.slide-up-leave-active&-placement-topLeft {
animation-name: antSlideDownOut;
}
2015-07-20 21:32:31 +08:00
&-hidden {
2015-08-20 17:27:40 +08:00
display: none;
}
2015-10-22 18:27:17 +08:00
}
// ========================= Options =========================
&-item {
position: relative;
display: block;
min-height: 32px;
padding: 5px @control-padding-horizontal;
color: @text-color;
font-weight: normal;
line-height: 22px;
cursor: pointer;
transition: background 0.3s ease;
2015-07-14 20:16:05 +08:00
// =========== Group ============
&-group {
color: @text-color-secondary;
2017-10-29 14:21:00 +08:00
font-size: @font-size-sm;
2015-08-23 15:42:38 +08:00
}
2015-08-01 17:51:55 +08:00
// =========== Option ===========
&-option {
display: flex;
2018-07-23 18:50:07 +08:00
&-content {
flex: auto;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
&-state {
flex: none;
}
&-active:not(&-disabled) {
background-color: @select-item-active-bg;
2018-02-27 17:21:33 +08:00
}
&-selected {
color: @text-color;
font-weight: @select-item-selected-font-weight;
background-color: @select-item-selected-bg;
}
2015-08-23 15:42:38 +08:00
&-disabled {
color: @disabled-color;
2015-08-23 15:42:38 +08:00
cursor: not-allowed;
}
}
}
// ============================================================
// == Size ==
// ============================================================
&-lg {
font-size: @font-size-lg;
2015-06-09 21:16:59 +08:00
}
2015-06-14 15:52:47 +08:00
}