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

243 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';
2018-12-07 20:02:01 +08:00
@timepicker-prefix-cls: ~'@{ant-prefix}-time-picker';
2017-10-16 21:52:15 +08:00
@timepicker-item-height: 32px;
.@{timepicker-prefix-cls}-panel {
.reset-component;
2019-04-15 10:52:00 +08:00
position: absolute;
z-index: @zindex-picker;
font-family: @font-family;
&-inner {
position: relative;
left: -2px;
2016-11-08 20:57:07 +08:00
font-size: @font-size-base;
text-align: left;
list-style: none;
background-color: @component-background;
background-clip: padding-box;
border-radius: @border-radius-base;
outline: none;
box-shadow: @box-shadow-base;
}
&-input {
2018-11-20 11:00:53 +08:00
width: 100%;
max-width: @time-picker-panel-column-width * 3 - @control-padding-horizontal - 2px;
margin: 0;
padding: 0;
line-height: normal;
border: 0;
outline: 0;
cursor: auto;
2017-08-03 21:56:43 +08:00
.placeholder;
&-wrap {
position: relative;
2017-10-19 20:58:16 +08:00
padding: 7px 2px 7px @control-padding-horizontal;
border-bottom: @border-width-base @border-style-base @border-color-split;
}
&-invalid {
border-color: @error-color;
}
}
&-narrow &-input-wrap {
max-width: @time-picker-panel-column-width * 2;
}
&-select {
position: relative; // Fix chrome weird render bug
float: left;
width: @time-picker-panel-column-width;
2017-10-16 21:52:15 +08:00
max-height: @timepicker-item-height * 6;
overflow: hidden;
font-size: @font-size-base;
border-left: @border-width-base @border-style-base @border-color-split;
&:hover {
overflow-y: auto;
}
&:first-child {
margin-left: 0;
border-left: 0;
}
&:last-child {
border-right: 0;
}
2016-11-11 14:44:37 +08:00
&:only-child {
width: 100%;
}
ul {
// use fixed width instead of 100%
// to fix strange render bug in safari: https://github.com/ant-design/ant-design/issues/17842
width: @time-picker-panel-column-width;
margin: 0;
2017-10-16 21:52:15 +08:00
padding: 0 0 @timepicker-item-height * 5;
list-style: none;
}
li {
width: 100%;
2017-10-16 21:52:15 +08:00
height: @timepicker-item-height;
margin: 0;
padding: 0 0 0 @control-padding-horizontal;
2017-10-16 21:52:15 +08:00
line-height: @timepicker-item-height;
text-align: left;
list-style: none;
cursor: pointer;
transition: all 0.3s;
user-select: none;
&:focus {
color: @primary-color;
font-weight: 600;
outline: none;
}
}
li:hover {
background: @item-hover-bg;
}
li&-option-selected {
font-weight: 600;
background: @time-picker-selected-bg;
2017-05-04 12:05:57 +08:00
&:hover {
background: @time-picker-selected-bg;
}
}
li&-option-disabled {
color: @btn-disable-color;
&:hover {
background: transparent;
cursor: not-allowed;
}
}
}
2016-11-06 14:53:29 +08:00
&-combobox {
.clearfix;
}
&-addon {
padding: 8px;
border-top: @border-width-base @border-style-base @border-color-split;
2016-11-06 14:53:29 +08:00
}
&.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;
2019-04-15 10:52:00 +08:00
position: relative;
display: inline-block;
width: 128px;
outline: none;
cursor: text;
2018-12-07 20:02:01 +08:00
transition: opacity 0.3s;
&-input {
.input;
&[disabled] {
.disabled;
}
}
&-open {
opacity: 0;
}
&-icon,
&-clear {
position: absolute;
top: 50%;
right: @control-padding-horizontal - 1px;
z-index: 1;
width: 14px;
height: 14px;
margin-top: -7px;
color: @disabled-color;
line-height: 14px;
transition: all 0.3s @ease-in-out;
user-select: none;
2018-08-14 14:45:04 +08:00
.@{timepicker-prefix-cls}-clock-icon {
2017-08-03 21:56:43 +08:00
display: block;
color: @disabled-color;
line-height: 1;
}
}
&-clear {
z-index: 2;
background: @input-bg;
opacity: 0;
pointer-events: none;
&:hover {
color: @text-color-secondary;
}
}
&:hover &-clear {
opacity: 1;
pointer-events: auto;
}
&-large &-input {
.input-lg;
}
&-small &-input {
.input-sm;
}
&-small &-icon,
&-small &-clear {
right: @control-padding-horizontal-sm - 1px;
}
}
// Fix cursor height in safari
// https://stackoverflow.com/q/3843408/3040605
// https://browserstrangeness.github.io/css_hacks.html#safari
@media not all and (min-resolution: 0.001dpcm) {
@supports (-webkit-appearance: none) and (stroke-color: transparent) {
.@{ant-prefix}-input {
line-height: @line-height-base;
}
}
}