diff --git a/components/auto-complete/style/index.less b/components/auto-complete/style/index.less index ac8cd7ec87..18304d24ce 100644 --- a/components/auto-complete/style/index.less +++ b/components/auto-complete/style/index.less @@ -19,8 +19,8 @@ line-height: @input-height-base; } &__placeholder { - margin-left: (@input-padding-horizontal + 1px); - margin-right: (@input-padding-horizontal + 1px); + margin-left: (@input-padding-horizontal-base + 1px); + margin-right: (@input-padding-horizontal-base + 1px); } &--single { diff --git a/components/form/style/index.less b/components/form/style/index.less index da37438aa6..cdcd45c0e9 100644 --- a/components/form/style/index.less +++ b/components/form/style/index.less @@ -285,7 +285,8 @@ form { // Form layout //== Vertical Form .make-vertical-layout() { - padding: 0 0 8px; + padding: @form-vertical-label-padding; + margin: @form-vertical-label-margin; display: block; text-align: left; line-height: @line-height-base; diff --git a/components/input/style/mixin.less b/components/input/style/mixin.less index 95a3c58200..d465800d5b 100644 --- a/components/input/style/mixin.less +++ b/components/input/style/mixin.less @@ -5,12 +5,12 @@ // size mixins for input .input-lg() { - padding: @input-padding-vertical-lg @input-padding-horizontal; + padding: @input-padding-vertical-lg @input-padding-horizontal-lg; height: @input-height-lg; } .input-sm() { - padding: @input-padding-vertical-sm @input-padding-horizontal; + padding: @input-padding-vertical-sm @input-padding-horizontal-sm; height: @input-height-sm; } @@ -41,7 +41,7 @@ .input() { position: relative; display: inline-block; - padding: @input-padding-vertical-base @input-padding-horizontal; + padding: @input-padding-vertical-base @input-padding-horizontal-base; width: 100%; height: @input-height-base; font-size: @font-size-base; @@ -137,7 +137,7 @@ } &-addon { - padding: @input-padding-vertical-base @input-padding-horizontal; + padding: @input-padding-vertical-base @input-padding-horizontal-base; font-size: @font-size-base; font-weight: normal; line-height: 1; @@ -151,7 +151,7 @@ // Reset Select's style in addon .@{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 { background-color: inherit; @@ -328,18 +328,18 @@ } .@{inputClass}-prefix { - left: @input-padding-horizontal; + left: @input-padding-horizontal-base; } .@{inputClass}-suffix { - right: @input-padding-horizontal; + right: @input-padding-horizontal-base; } .@{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) { - padding-right: @input-padding-horizontal + @input-affix-width; + padding-right: @input-padding-horizontal-base + @input-affix-width; } } diff --git a/components/style/themes/default.less b/components/style/themes/default.less index 6e1e7b27ca..3179e6806c 100644 --- a/components/style/themes/default.less +++ b/components/style/themes/default.less @@ -218,23 +218,28 @@ @label-color : @heading-color; @form-item-margin-bottom : 24px; @form-item-trailing-colon : true; +@form-vertical-label-padding : 0 0 8px; +@form-vertical-label-margin : 0; // Input // --- -@input-height-base : 28px; -@input-height-lg : 32px; -@input-height-sm : 22px; -@input-padding-horizontal : 7px; -@input-padding-vertical-base : 4px; -@input-padding-vertical-sm : 1px; -@input-padding-vertical-lg : 6px; -@input-placeholder-color : hsv(0, 0, 75%); -@input-color : @text-color; -@input-border-color : @border-color-base; -@input-bg : #fff; -@input-addon-bg : #eee; -@input-hover-border-color : @primary-color; -@input-disabled-bg : @disabled-bg; +@input-height-base : 28px; +@input-height-lg : 32px; +@input-height-sm : 22px; +@input-padding-horizontal : 7px; +@input-padding-horizontal-base : @input-padding-horizontal; +@input-padding-horizontal-sm : @input-padding-horizontal; +@input-padding-horizontal-lg : @input-padding-horizontal; +@input-padding-vertical-base : 4px; +@input-padding-vertical-sm : 1px; +@input-padding-vertical-lg : 6px; +@input-placeholder-color : hsv(0, 0, 75%); +@input-color : @text-color; +@input-border-color : @border-color-base; +@input-bg : #fff; +@input-addon-bg : #eee; +@input-hover-border-color : @primary-color; +@input-disabled-bg : @disabled-bg; // Tooltip // ---