mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-08 01:53:34 +08:00
fix: datePicker size (#20384)
* fix: datePicker size * fix align * remove componet less var and use input base * use padding spread * extract picker-padding * fix spelling mistakes
This commit is contained in:
parent
2464de1888
commit
30bb97552e
@ -6,6 +6,14 @@
|
|||||||
@picker-prefix-cls: ~'@{ant-prefix}-picker';
|
@picker-prefix-cls: ~'@{ant-prefix}-picker';
|
||||||
@picker-text-height: 40px;
|
@picker-text-height: 40px;
|
||||||
|
|
||||||
|
.picker-padding(@input-height, @font-size, @padding-horizontal) {
|
||||||
|
// font height probably 22.0001, So use floor better
|
||||||
|
@font-height: floor(@font-size * @line-height-base) + 2;
|
||||||
|
@padding-top: (@input-height - @font-height) / 2;
|
||||||
|
@padding-bottom: @input-height - @font-height - @padding-top;
|
||||||
|
padding: @padding-top @padding-horizontal @padding-bottom;
|
||||||
|
}
|
||||||
|
|
||||||
.@{picker-prefix-cls} {
|
.@{picker-prefix-cls} {
|
||||||
@vertical-fix-base: @input-height-base - ceil(@font-size-base * @line-height-base) - 2 *
|
@vertical-fix-base: @input-height-base - ceil(@font-size-base * @line-height-base) - 2 *
|
||||||
@input-padding-vertical-base - 2 * @border-width-base;
|
@input-padding-vertical-base - 2 * @border-width-base;
|
||||||
@ -16,9 +24,9 @@
|
|||||||
@arrow-size: 10px;
|
@arrow-size: 10px;
|
||||||
|
|
||||||
.reset-component;
|
.reset-component;
|
||||||
|
.picker-padding(@input-height-base, @font-size-base, @input-padding-horizontal-base);
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
padding: @input-padding-vertical-base @input-padding-horizontal-base @input-padding-vertical-base +
|
align-items: center;
|
||||||
@vertical-fix-base;
|
|
||||||
background: @component-background;
|
background: @component-background;
|
||||||
border: @border-width-base @border-style-base @select-border-color;
|
border: @border-width-base @border-style-base @select-border-color;
|
||||||
border-radius: @border-radius-base;
|
border-radius: @border-radius-base;
|
||||||
@ -75,8 +83,7 @@
|
|||||||
|
|
||||||
// Size
|
// Size
|
||||||
&-large {
|
&-large {
|
||||||
padding: @input-padding-vertical-lg @input-padding-horizontal-lg @input-padding-vertical-lg +
|
.picker-padding(@input-height-lg, @font-size-lg, @input-padding-horizontal-lg);
|
||||||
@vertical-fix-lg;
|
|
||||||
|
|
||||||
.@{picker-prefix-cls}-input > input {
|
.@{picker-prefix-cls}-input > input {
|
||||||
font-size: @font-size-lg;
|
font-size: @font-size-lg;
|
||||||
@ -84,8 +91,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&-small {
|
&-small {
|
||||||
padding: @input-padding-vertical-sm @input-padding-horizontal-sm @input-padding-vertical-sm +
|
.picker-padding(@input-height-sm, @font-size-base, @input-padding-horizontal-sm);
|
||||||
@vertical-fix-sm;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&-suffix {
|
&-suffix {
|
||||||
|
Loading…
Reference in New Issue
Block a user