diff --git a/components/badge/style/index.less b/components/badge/style/index.less index 698aa3d9065..36deed8298b 100644 --- a/components/badge/style/index.less +++ b/components/badge/style/index.less @@ -190,7 +190,7 @@ display: inline-block; height: @badge-height; transition: all 0.3s @ease-in-out; - > p { + > p.@{number-prefix-cls}-only-unit { height: @badge-height; margin: 0; } diff --git a/components/card/style/index.less b/components/card/style/index.less index 53683775700..444ba7ba23c 100644 --- a/components/card/style/index.less +++ b/components/card/style/index.less @@ -166,7 +166,7 @@ position: relative; display: block; min-width: 32px; - font-size: 14px; + font-size: @font-size-base; line-height: 22px; cursor: pointer; diff --git a/components/cascader/style/index.less b/components/cascader/style/index.less index b99938e9f22..5d54d9ebe76 100644 --- a/components/cascader/style/index.less +++ b/components/cascader/style/index.less @@ -59,6 +59,11 @@ .active; } + &-borderless .@{cascader-prefix-cls}-input { + border-color: transparent !important; + box-shadow: none !important; + } + &-show-search&-focused { color: @disabled-color; } diff --git a/components/collapse/style/index.less b/components/collapse/style/index.less index d96f6138259..4354572e50b 100644 --- a/components/collapse/style/index.less +++ b/components/collapse/style/index.less @@ -33,6 +33,7 @@ line-height: 22px; cursor: pointer; transition: all 0.3s; + .clearfix; .@{collapse-prefix-cls}-rtl & { padding: @collapse-header-padding; diff --git a/components/date-picker/style/index.less b/components/date-picker/style/index.less index 2537b7d06e8..fee73bfafb6 100644 --- a/components/date-picker/style/index.less +++ b/components/date-picker/style/index.less @@ -51,6 +51,12 @@ border-color: @select-border-color; } + &&-borderless { + background-color: transparent !important; + border-color: transparent !important; + box-shadow: none !important; + } + // ======================== Input ========================= &-input { position: relative; diff --git a/components/form/style/index.less b/components/form/style/index.less index 0a182f0d00d..b8f0279e106 100644 --- a/components/form/style/index.less +++ b/components/form/style/index.less @@ -62,9 +62,10 @@ height: 100%; max-height: @input-height-base; color: @label-color; + font-size: @form-item-label-font-size; > .@{iconfont-css-prefix} { - font-size: @font-size-base; + font-size: @form-item-label-font-size; vertical-align: top; } @@ -72,7 +73,7 @@ display: inline-block; margin-right: 4px; color: @label-required-color; - font-size: @font-size-base; + font-size: @form-item-label-font-size; font-family: SimSun, sans-serif; line-height: 1; content: '*'; diff --git a/components/form/style/mixin.less b/components/form/style/mixin.less index ef6de5c815d..1f3b3b299eb 100644 --- a/components/form/style/mixin.less +++ b/components/form/style/mixin.less @@ -6,14 +6,16 @@ color: @text-color; } // 输入框的不同校验状态 - .@{ant-prefix}-input { + .@{ant-prefix}-input, + .@{ant-prefix}-input-affix-wrapper { &, &:hover { background-color: @background-color; border-color: @border-color; } - &:focus { + &:focus, + &-focused { .active(@border-color); } @@ -22,27 +24,14 @@ } } - .@{ant-prefix}-calendar-picker-open .@{ant-prefix}-calendar-picker-input { - .active(@border-color); - } - - // Input prefix .@{ant-prefix}-input-affix-wrapper { - .@{ant-prefix}-input { - &, - &:hover { - background-color: @background-color; - border-color: @border-color; - } - - &:focus { - .active(@border-color); - } + input:focus { + box-shadow: none !important; } + } - &:hover .@{ant-prefix}-input:not(.@{ant-prefix}-input-disabled) { - border-color: @border-color; - } + .@{ant-prefix}-calendar-picker-open .@{ant-prefix}-calendar-picker-input { + .active(@border-color); } .@{ant-prefix}-input-prefix { diff --git a/components/input/style/mixin.less b/components/input/style/mixin.less index 4b6fa2c8b44..f968b6d0095 100644 --- a/components/input/style/mixin.less +++ b/components/input/style/mixin.less @@ -306,9 +306,7 @@ } .@{inputClass}-affix-wrapper { - display: table-cell; - float: left; - width: 100%; + border-radius: 0; } &&-compact { diff --git a/components/notification/style/index.less b/components/notification/style/index.less index b8933732410..06c9cc3556a 100644 --- a/components/notification/style/index.less +++ b/components/notification/style/index.less @@ -33,15 +33,24 @@ cursor: pointer; } + &-hook-holder, &-notice { position: relative; margin-bottom: @notification-margin-bottom; - padding: @notification-padding; overflow: hidden; - line-height: 1.5; background: @notification-bg; border-radius: @border-radius-base; box-shadow: @shadow-2; + } + + &-hook-holder > &-notice { + margin-bottom: 0; + box-shadow: none; + } + + &-notice { + padding: @notification-padding; + line-height: @line-height-base; &-message { display: inline-block; diff --git a/components/page-header/style/index.less b/components/page-header/style/index.less index f6cbb1791c9..70029a7376a 100644 --- a/components/page-header/style/index.less +++ b/components/page-header/style/index.less @@ -151,7 +151,7 @@ } .@{ant-prefix}-tabs-tab { - padding: 8px; + padding: @tabs-horizontal-padding-sm; font-size: 16px; } } diff --git a/components/radio/style/index.less b/components/radio/style/index.less index b966eeb026d..152cea85087 100644 --- a/components/radio/style/index.less +++ b/components/radio/style/index.less @@ -16,6 +16,14 @@ &-rtl { direction: rtl; } + + .@{ant-prefix}-badge-count { + z-index: 1; + } + + > .@{ant-prefix}-badge:not(:first-child) > .@{radio-prefix-cls}-button-wrapper { + border-left: none; + } } // 一般状态 @@ -209,6 +217,7 @@ span.@{radio-prefix-cls} + * { content: ''; } } + &:first-child { border-left: @border-width-base @border-style-base @border-color-base; border-radius: @border-radius-base 0 0 @border-radius-base; diff --git a/components/select/style/index.less b/components/select/style/index.less index 0c158c82f0e..cab2a240608 100644 --- a/components/select/style/index.less +++ b/components/select/style/index.less @@ -272,4 +272,11 @@ &-lg { font-size: @font-size-lg; } + + // no border style + &-borderless &-selector { + background-color: transparent !important; + border-color: transparent !important; + box-shadow: none !important; + } } diff --git a/components/select/style/multiple.less b/components/select/style/multiple.less index 7a489b386c8..78ee05255b2 100644 --- a/components/select/style/multiple.less +++ b/components/select/style/multiple.less @@ -1,10 +1,11 @@ @import './index'; -@select-selection-height: @input-height-base - @input-padding-vertical-base * 2; -@select-multiple-padding: @input-padding-vertical-base; -@select-multiple-item-margin-vertical: round( - (@select-selection-height - @font-size-base * @line-height-base) / 2 * 10 - ) / 10; +@select-multiple-item-border-width: 1px; +@select-multiple-item-height: @input-height-base - @input-padding-vertical-base * 2; // Normal 24px + +@select-multiple-item-spacing-half: ceil(@input-padding-vertical-base / 2); +@select-multiple-padding: @input-padding-vertical-base - @select-multiple-item-border-width - + @select-multiple-item-spacing-half; /** * Do not merge `height` & `line-height` under style with `selection` & `search`, @@ -21,11 +22,19 @@ flex-wrap: wrap; align-items: center; // Multiple is little different that horizontal is follow the vertical - padding: @select-multiple-padding @select-multiple-padding; + padding: @select-multiple-padding @input-padding-vertical-base; .@{select-prefix-cls}-show-search& { cursor: text; } + + &::after { + display: inline-block; + width: 0; + margin: @select-multiple-item-spacing-half 0; + line-height: @select-multiple-item-height; + content: '\a0'; + } } &.@{select-prefix-cls}-allow-clear .@{select-prefix-cls}-selector { @@ -40,12 +49,12 @@ box-sizing: border-box; max-width: 100%; - height: @select-selection-height; - margin-top: -@select-multiple-item-margin-vertical; + height: @select-multiple-item-height; + margin-top: @select-multiple-item-spacing-half; margin-right: @input-padding-vertical-base; - margin-bottom: -@select-multiple-item-margin-vertical; + margin-bottom: @select-multiple-item-spacing-half; padding: 0 (@padding-xs / 2) 0 @padding-xs; - line-height: @select-selection-height - @border-width-base * 2; + line-height: @select-multiple-item-height - @select-multiple-item-border-width * 2; background: @select-selection-item-bg; border: 1px solid @select-selection-item-border-color; border-radius: @border-radius-base; @@ -150,6 +159,10 @@ @select-selection-height: @input-height - @input-padding-vertical-base * 2; @select-height-without-border: @input-height - @border-width-base * 2; + .@{select-prefix-cls}-selector::after { + line-height: @select-selection-height; + } + .@{select-prefix-cls}-selection-item { height: @select-selection-height; line-height: @select-selection-height - @border-width-base * 2; diff --git a/components/slider/style/index.less b/components/slider/style/index.less index fd696812a8b..75dbe169dc5 100644 --- a/components/slider/style/index.less +++ b/components/slider/style/index.less @@ -53,12 +53,15 @@ transition: border-color 0.3s, box-shadow 0.6s, transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28); - &:focus { + &-dragging&-dragging&-dragging { border-color: @slider-handle-color-focus; - outline: none; box-shadow: 0 0 0 5px @slider-handle-color-focus-shadow; } + &:focus { + outline: none; + } + &.@{ant-prefix}-tooltip-open { border-color: @slider-handle-color-tooltip-open; } diff --git a/components/steps/style/label-placement.less b/components/steps/style/label-placement.less index 9d816e586e8..f8cbb6fd62a 100644 --- a/components/steps/style/label-placement.less +++ b/components/steps/style/label-placement.less @@ -31,7 +31,7 @@ &.@{steps-prefix-cls}-small:not(.@{steps-prefix-cls}-dot) { .@{steps-prefix-cls}-item { &-icon { - margin-left: 40px; + margin-left: 47px; } } } diff --git a/components/style/mixins/clearfix.less b/components/style/mixins/clearfix.less index 7999a3e92fa..d61f6c7b662 100644 --- a/components/style/mixins/clearfix.less +++ b/components/style/mixins/clearfix.less @@ -1,13 +1,9 @@ // mixins for clearfix // ------------------------ .clearfix() { - zoom: 1; - &::before, - &::after { - display: table; - content: ''; - } &::after { + display: block; clear: both; + content: ''; } } diff --git a/components/style/themes/default.less b/components/style/themes/default.less index 671ae1494f6..84c258f5376 100644 --- a/components/style/themes/default.less +++ b/components/style/themes/default.less @@ -328,6 +328,7 @@ @form-item-trailing-colon: true; @form-vertical-label-padding: 0 0 8px; @form-vertical-label-margin: 0; +@form-item-label-font-size: @font-size-base; @form-item-label-colon-margin-right: 8px; @form-item-label-colon-margin-left: 2px; @form-error-input-bg: @input-bg; @@ -603,9 +604,9 @@ @tabs-bar-margin: 0 0 16px 0; @tabs-horizontal-margin: 0 32px 0 0; @tabs-horizontal-margin-rtl: 0 0 0 32px; -@tabs-horizontal-padding: 12px 16px; -@tabs-horizontal-padding-lg: 16px; -@tabs-horizontal-padding-sm: 8px 16px; +@tabs-horizontal-padding: 12px 0; +@tabs-horizontal-padding-lg: 16px 0; +@tabs-horizontal-padding-sm: 8px 0; @tabs-vertical-padding: 8px 24px; @tabs-vertical-margin: 0 0 16px 0; @tabs-scrolling-size: 32px; diff --git a/components/timeline/style/index.less b/components/timeline/style/index.less index 5d143add407..808095403ac 100644 --- a/components/timeline/style/index.less +++ b/components/timeline/style/index.less @@ -168,8 +168,7 @@ text-align: right; .@{timeline-prefix-cls}-rtl& { - width: 100%; - margin-right: 12px; + text-align: left; } } } @@ -195,6 +194,7 @@ .@{timeline-prefix-cls}-rtl& { width: 100%; margin-right: 18px; + text-align: right; } } } diff --git a/components/transfer/style/index.less b/components/transfer/style/index.less index cb2d3b05fa8..958c8d7793d 100644 --- a/components/transfer/style/index.less +++ b/components/transfer/style/index.less @@ -39,7 +39,8 @@ } &-search { - padding: 0 24px 0 @control-padding-horizontal-sm; + padding-right: 24px; + padding-left: @control-padding-horizontal-sm; &-action { position: absolute; top: 12px;