ant-design-vue/components/time-picker/style/index.less

225 lines
4.7 KiB
Plaintext
Raw Normal View History

2019-01-02 21:01:56 +08:00
@import '../../style/themes/default';
@import '../../style/mixins/index';
@import '../../input/style/mixin';
2018-03-07 22:21:55 +08:00
2019-01-02 21:01:56 +08:00
@timepicker-prefix-cls: ~'@{ant-prefix}-time-picker';
2018-03-07 22:21:55 +08:00
@timepicker-item-height: 32px;
.@{timepicker-prefix-cls}-panel {
.reset-component;
position: absolute;
2019-03-30 16:06:06 +08:00
z-index: @zindex-picker;
font-family: @font-family;
2018-03-07 22:21:55 +08:00
&-inner {
position: relative;
2019-03-30 16:06:06 +08:00
left: -2px;
2018-03-07 22:21:55 +08:00
font-size: @font-size-base;
text-align: left;
2019-03-30 16:06:06 +08:00
list-style: none;
2018-03-07 22:21:55 +08:00
background-color: @component-background;
2019-03-30 16:06:06 +08:00
background-clip: padding-box;
2018-03-07 22:21:55 +08:00
border-radius: @border-radius-base;
2019-03-30 16:06:06 +08:00
outline: none;
2018-03-07 22:21:55 +08:00
box-shadow: @box-shadow-base;
}
&-input {
2018-12-09 19:30:35 +08:00
width: 100%;
2019-03-30 16:06:06 +08:00
max-width: @time-picker-panel-column-width * 3 - @control-padding-horizontal - 2px;
2018-03-07 22:21:55 +08:00
margin: 0;
padding: 0;
2019-03-30 16:06:06 +08:00
line-height: normal;
2018-03-07 22:21:55 +08:00
border: 0;
outline: 0;
2019-03-30 16:06:06 +08:00
cursor: auto;
2018-03-07 22:21:55 +08:00
.placeholder;
&-wrap {
position: relative;
2019-03-30 16:06:06 +08:00
box-sizing: border-box;
2018-03-07 22:21:55 +08:00
padding: 7px 2px 7px @control-padding-horizontal;
border-bottom: @border-width-base @border-style-base @border-color-split;
}
&-invalid {
2019-01-02 21:01:56 +08:00
border-color: @error-color;
2018-03-07 22:21:55 +08:00
}
}
&-narrow &-input-wrap {
max-width: @time-picker-panel-column-width * 2;
}
&-select {
2019-03-30 16:06:06 +08:00
position: relative; // Fix chrome weird render bug
2018-03-07 22:21:55 +08:00
float: left;
box-sizing: border-box;
width: @time-picker-panel-column-width;
max-height: @timepicker-item-height * 6;
2019-03-30 16:06:06 +08:00
overflow: hidden;
font-size: @font-size-base;
border-left: @border-width-base @border-style-base @border-color-split;
2018-03-07 22:21:55 +08:00
&:hover {
overflow-y: auto;
}
&:first-child {
margin-left: 0;
2019-03-30 16:06:06 +08:00
border-left: 0;
2018-03-07 22:21:55 +08:00
}
&:last-child {
border-right: 0;
}
&:only-child {
width: 100%;
}
ul {
box-sizing: border-box;
2019-03-30 16:06:06 +08:00
width: 100%;
2018-03-07 22:21:55 +08:00
margin: 0;
padding: 0 0 @timepicker-item-height * 5;
2019-03-30 16:06:06 +08:00
list-style: none;
2018-03-07 22:21:55 +08:00
}
li {
box-sizing: content-box;
width: 100%;
height: @timepicker-item-height;
2019-03-30 16:06:06 +08:00
margin: 0;
padding: 0 0 0 @control-padding-horizontal;
2018-03-07 22:21:55 +08:00
line-height: @timepicker-item-height;
text-align: left;
2019-03-30 16:06:06 +08:00
list-style: none;
2018-03-07 22:21:55 +08:00
cursor: pointer;
transition: background 0.3s;
2019-03-30 16:06:06 +08:00
user-select: none;
2018-03-07 22:21:55 +08:00
}
li:hover {
background: @item-hover-bg;
}
li&-option-selected {
font-weight: bold;
2019-03-30 16:06:06 +08:00
background: @time-picker-selected-bg;
2018-03-07 22:21:55 +08:00
&:hover {
background: @time-picker-selected-bg;
}
}
li&-option-disabled {
color: @btn-disable-color;
&:hover {
background: transparent;
cursor: not-allowed;
}
}
}
&-combobox {
.clearfix;
}
&-addon {
padding: 8px;
border-top: @border-width-base @border-style-base @border-color-split;
}
&.slide-up-enter.slide-up-enter-active&-placement-topLeft,
&.slide-up-enter.slide-up-enter-active&-placement-topRight,
&.slide-up-appear.slide-up-appear-active&-placement-topLeft,
&.slide-up-appear.slide-up-appear-active&-placement-topRight {
animation-name: antSlideDownIn;
}
&.slide-up-enter.slide-up-enter-active&-placement-bottomLeft,
&.slide-up-enter.slide-up-enter-active&-placement-bottomRight,
&.slide-up-appear.slide-up-appear-active&-placement-bottomLeft,
&.slide-up-appear.slide-up-appear-active&-placement-bottomRight {
animation-name: antSlideUpIn;
}
&.slide-up-leave.slide-up-leave-active&-placement-topLeft,
&.slide-up-leave.slide-up-leave-active&-placement-topRight {
animation-name: antSlideDownOut;
}
&.slide-up-leave.slide-up-leave-active&-placement-bottomLeft,
&.slide-up-leave.slide-up-leave-active&-placement-bottomRight {
animation-name: antSlideUpOut;
}
}
.@{timepicker-prefix-cls} {
.reset-component;
position: relative;
display: inline-block;
2019-03-30 16:06:06 +08:00
width: 128px;
2018-03-07 22:21:55 +08:00
outline: none;
2019-01-02 21:01:56 +08:00
transition: opacity 0.3s;
2018-03-07 22:21:55 +08:00
&-input {
.input;
&[disabled] {
.disabled;
}
}
&-open {
opacity: 0;
}
2019-03-30 16:06:06 +08:00
&-icon,
&-clear {
2018-03-07 22:21:55 +08:00
position: absolute;
2019-03-30 16:06:06 +08:00
top: 50%;
right: @control-padding-horizontal - 1px;
z-index: 1;
2018-03-07 22:21:55 +08:00
width: 14px;
height: 14px;
margin-top: -7px;
2019-03-30 16:06:06 +08:00
color: @disabled-color;
line-height: 14px;
transition: all 0.3s @ease-in-out;
user-select: none;
2018-11-14 21:33:56 +08:00
.@{timepicker-prefix-cls}-clock-icon {
2018-03-07 22:21:55 +08:00
display: block;
2019-03-30 16:06:06 +08:00
color: @disabled-color;
2018-03-07 22:21:55 +08:00
line-height: 1;
}
}
2019-03-30 16:06:06 +08:00
&-clear {
z-index: 2;
background: @input-bg;
opacity: 0;
pointer-events: none;
&:hover {
color: @text-color-secondary;
}
}
&:hover &-clear {
opacity: 1;
pointer-events: auto;
}
2018-03-07 22:21:55 +08:00
&-large &-input {
.input-lg;
}
&-small &-input {
.input-sm;
}
2019-03-30 16:06:06 +08:00
&-small &-icon,
&-small &-clear {
2018-03-07 22:21:55 +08:00
right: @control-padding-horizontal-sm - 1px;
}
}