syssam 7 years ago
committed by 偏右
parent
commit
f8b7aad53d
  1. 4
      components/auto-complete/style/index.less
  2. 3
      components/form/style/index.less
  3. 18
      components/input/style/mixin.less
  4. 33
      components/style/themes/default.less

4
components/auto-complete/style/index.less

@ -19,8 +19,8 @@
line-height: @input-height-base; line-height: @input-height-base;
} }
&__placeholder { &__placeholder {
margin-left: (@input-padding-horizontal + 1px); margin-left: (@input-padding-horizontal-base + 1px);
margin-right: (@input-padding-horizontal + 1px); margin-right: (@input-padding-horizontal-base + 1px);
} }
&--single { &--single {

3
components/form/style/index.less

@ -285,7 +285,8 @@ form {
// Form layout // Form layout
//== Vertical Form //== Vertical Form
.make-vertical-layout() { .make-vertical-layout() {
padding: 0 0 8px; padding: @form-vertical-label-padding;
margin: @form-vertical-label-margin;
display: block; display: block;
text-align: left; text-align: left;
line-height: @line-height-base; line-height: @line-height-base;

18
components/input/style/mixin.less

@ -5,12 +5,12 @@
// size mixins for input // size mixins for input
.input-lg() { .input-lg() {
padding: @input-padding-vertical-lg @input-padding-horizontal; padding: @input-padding-vertical-lg @input-padding-horizontal-lg;
height: @input-height-lg; height: @input-height-lg;
} }
.input-sm() { .input-sm() {
padding: @input-padding-vertical-sm @input-padding-horizontal; padding: @input-padding-vertical-sm @input-padding-horizontal-sm;
height: @input-height-sm; height: @input-height-sm;
} }
@ -41,7 +41,7 @@
.input() { .input() {
position: relative; position: relative;
display: inline-block; display: inline-block;
padding: @input-padding-vertical-base @input-padding-horizontal; padding: @input-padding-vertical-base @input-padding-horizontal-base;
width: 100%; width: 100%;
height: @input-height-base; height: @input-height-base;
font-size: @font-size-base; font-size: @font-size-base;
@ -137,7 +137,7 @@
} }
&-addon { &-addon {
padding: @input-padding-vertical-base @input-padding-horizontal; padding: @input-padding-vertical-base @input-padding-horizontal-base;
font-size: @font-size-base; font-size: @font-size-base;
font-weight: normal; font-weight: normal;
line-height: 1; line-height: 1;
@ -151,7 +151,7 @@
// Reset Select's style in addon // Reset Select's style in addon
.@{ant-prefix}-select { .@{ant-prefix}-select {
margin: -(@input-padding-vertical-base + 1px) (-@input-padding-horizontal); // lesshint spaceAroundOperator: false margin: -(@input-padding-vertical-base + 1px) (-@input-padding-horizontal-base); // lesshint spaceAroundOperator: false
.@{ant-prefix}-select-selection { .@{ant-prefix}-select-selection {
background-color: inherit; background-color: inherit;
@ -328,18 +328,18 @@
} }
.@{inputClass}-prefix { .@{inputClass}-prefix {
left: @input-padding-horizontal; left: @input-padding-horizontal-base;
} }
.@{inputClass}-suffix { .@{inputClass}-suffix {
right: @input-padding-horizontal; right: @input-padding-horizontal-base;
} }
.@{inputClass}:not(:first-child) { .@{inputClass}:not(:first-child) {
padding-left: @input-padding-horizontal + @input-affix-width; padding-left: @input-padding-horizontal-base + @input-affix-width;
} }
.@{inputClass}:not(:last-child) { .@{inputClass}:not(:last-child) {
padding-right: @input-padding-horizontal + @input-affix-width; padding-right: @input-padding-horizontal-base + @input-affix-width;
} }
} }

33
components/style/themes/default.less

@ -218,23 +218,28 @@
@label-color : @heading-color; @label-color : @heading-color;
@form-item-margin-bottom : 24px; @form-item-margin-bottom : 24px;
@form-item-trailing-colon : true; @form-item-trailing-colon : true;
@form-vertical-label-padding : 0 0 8px;
@form-vertical-label-margin : 0;
// Input // Input
// --- // ---
@input-height-base : 28px; @input-height-base : 28px;
@input-height-lg : 32px; @input-height-lg : 32px;
@input-height-sm : 22px; @input-height-sm : 22px;
@input-padding-horizontal : 7px; @input-padding-horizontal : 7px;
@input-padding-vertical-base : 4px; @input-padding-horizontal-base : @input-padding-horizontal;
@input-padding-vertical-sm : 1px; @input-padding-horizontal-sm : @input-padding-horizontal;
@input-padding-vertical-lg : 6px; @input-padding-horizontal-lg : @input-padding-horizontal;
@input-placeholder-color : hsv(0, 0, 75%); @input-padding-vertical-base : 4px;
@input-color : @text-color; @input-padding-vertical-sm : 1px;
@input-border-color : @border-color-base; @input-padding-vertical-lg : 6px;
@input-bg : #fff; @input-placeholder-color : hsv(0, 0, 75%);
@input-addon-bg : #eee; @input-color : @text-color;
@input-hover-border-color : @primary-color; @input-border-color : @border-color-base;
@input-disabled-bg : @disabled-bg; @input-bg : #fff;
@input-addon-bg : #eee;
@input-hover-border-color : @primary-color;
@input-disabled-bg : @disabled-bg;
// Tooltip // Tooltip
// --- // ---

Loading…
Cancel
Save