diff --git a/components/alert/style/index.less b/components/alert/style/index.less index 0e189d096..3e04bd8e4 100644 --- a/components/alert/style/index.less +++ b/components/alert/style/index.less @@ -77,6 +77,7 @@ line-height: 22px; background-color: transparent; border: none; + outline: none; cursor: pointer; .@{iconfont-css-prefix}-close { @@ -138,7 +139,7 @@ display: block; } - &&-close { + &&-closing { height: 0 !important; margin: 0; padding-top: 0; diff --git a/components/button/style/index.less b/components/button/style/index.less index 8cfc3768f..831c64e80 100644 --- a/components/button/style/index.less +++ b/components/button/style/index.less @@ -12,7 +12,15 @@ // Button styles // ----------------------------- .@{btn-prefix-cls} { - line-height: @line-height-base; + // Fixing https://github.com/ant-design/ant-design/issues/12978 + // Fixing https://github.com/ant-design/ant-design/issues/20058 + // Fixing https://github.com/ant-design/ant-design/issues/19972 + // Fixing https://github.com/ant-design/ant-design/issues/12978 + // Fixing https://github.com/ant-design/ant-design/issues/18107 + // Fixing https://github.com/ant-design/ant-design/issues/13214 + // It is a render problem of chrome, which is only happened in the codesandbox demo + // 0.001px solution works and I don't why + line-height: @line-height-base - 0.001; .btn; .btn-default; @@ -73,6 +81,10 @@ &-icon-only { .btn-square(@btn-prefix-cls); + + > i { + vertical-align: middle; + } } &-round { @@ -118,7 +130,9 @@ &&-loading { position: relative; - pointer-events: none; + &:not([disabled]) { + pointer-events: none; + } } &&-loading::before { diff --git a/components/button/style/mixin.less b/components/button/style/mixin.less index 9fa89d623..832ca185a 100644 --- a/components/button/style/mixin.less +++ b/components/button/style/mixin.less @@ -124,6 +124,9 @@ z-index: 0; } } + > .@{btnClassName}-icon-only { + font-size: @font-size-base; + } // size &-lg > .@{btnClassName}, &-lg > span > .@{btnClassName} { diff --git a/components/card/style/index.less b/components/card/style/index.less index d87deed0e..4258e846e 100644 --- a/components/card/style/index.less +++ b/components/card/style/index.less @@ -144,7 +144,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 71ad95fec..0d16de2af 100644 --- a/components/cascader/style/index.less +++ b/components/cascader/style/index.less @@ -125,7 +125,7 @@ &-menus { position: absolute; z-index: @zindex-dropdown; - font-size: @font-size-base; + font-size: @cascader-dropdown-font-size; white-space: nowrap; background: @component-background; border-radius: @border-radius-base; @@ -134,7 +134,6 @@ ul, ol { margin: 0; - padding: 0; list-style: none; } @@ -165,7 +164,7 @@ min-width: 111px; height: 180px; margin: 0; - padding: 0; + padding: @cascader-dropdown-edge-child-vertical-padding 0; overflow: auto; vertical-align: top; list-style: none; @@ -185,8 +184,8 @@ } } &-menu-item { - padding: 5px @control-padding-horizontal; - line-height: 22px; + padding: @cascader-dropdown-vertical-padding @control-padding-horizontal; + line-height: @cascader-dropdown-line-height; white-space: nowrap; cursor: pointer; transition: all 0.3s; diff --git a/components/checkbox/style/mixin.less b/components/checkbox/style/mixin.less index 7a3b1c886..ff070543e 100644 --- a/components/checkbox/style/mixin.less +++ b/components/checkbox/style/mixin.less @@ -61,7 +61,7 @@ position: absolute; top: 50%; - left: 21%; + left: 22%; display: table; width: @check-width; height: @check-height; @@ -151,6 +151,9 @@ display: inline-block; line-height: unset; cursor: pointer; + &.@{checkbox-prefix-cls}-wrapper-disabled { + cursor: not-allowed; + } & + & { margin-left: 8px; } diff --git a/components/collapse/style/index.less b/components/collapse/style/index.less index 47d016cc2..217f71bec 100644 --- a/components/collapse/style/index.less +++ b/components/collapse/style/index.less @@ -70,7 +70,7 @@ .@{collapse-prefix-cls}-arrow { right: @padding-md; - left: initial; + left: auto; } } } @@ -102,7 +102,7 @@ } &-borderless { - background-color: @component-background; + background-color: @collapse-header-bg; border: 0; } diff --git a/components/comment/style/index.less b/components/comment/style/index.less index b83a73447..6af4c81b1 100644 --- a/components/comment/style/index.less +++ b/components/comment/style/index.less @@ -32,12 +32,12 @@ &-author { display: flex; + flex-wrap: wrap; justify-content: flex-start; margin-bottom: 4px; font-size: @comment-font-size-base; & > a, & > span { - height: 18px; padding-right: 8px; font-size: @comment-font-size-sm; line-height: 18px; diff --git a/components/drawer/style/drawer.less b/components/drawer/style/drawer.less index 1f0876872..20eac54f3 100644 --- a/components/drawer/style/drawer.less +++ b/components/drawer/style/drawer.less @@ -140,6 +140,7 @@ &-content { position: relative; z-index: 1; + overflow: auto; background-color: @component-background; background-clip: padding-box; border: 0; @@ -196,6 +197,10 @@ line-height: @line-height-base; word-wrap: break-word; } + &-wrapper-body { + height: 100%; + overflow: auto; + } &-mask { position: absolute; diff --git a/components/dropdown/style/index.less b/components/dropdown/style/index.less index 024684b1a..39090eafa 100644 --- a/components/dropdown/style/index.less +++ b/components/dropdown/style/index.less @@ -49,7 +49,7 @@ &-menu { position: relative; margin: 0; - padding: 4px 0; + padding: @dropdown-edge-child-vertical-padding 0; text-align: left; list-style-type: none; background-color: @component-background; @@ -72,6 +72,17 @@ > .@{dropdown-prefix-cls}-menu { transform-origin: 0 0; } + + ul, + li { + list-style: none; + } + + ul { + margin-right: 0.3em; + margin-left: 0.3em; + padding: 0; + } } &-item, @@ -87,9 +98,11 @@ cursor: pointer; transition: all 0.3s; - > .anticon:first-child { + > .anticon:first-child, + > span > .anticon:first-child { min-width: 12px; margin-right: 8px; + font-size: @font-size-sm; } > a { @@ -100,6 +113,18 @@ transition: all 0.3s; } + &:first-child { + & when (@dropdown-edge-child-vertical-padding = 0) { + border-radius: @border-radius-base @border-radius-base 0 0; + } + } + + &:last-child { + & when (@dropdown-edge-child-vertical-padding = 0) { + border-radius: 0 0 @border-radius-base @border-radius-base; + } + } + &-selected, &-selected > a { color: @dropdown-selected-color; @@ -128,6 +153,7 @@ line-height: 0; background-color: @border-color-split; } + .@{dropdown-prefix-cls}-menu-submenu-arrow { position: absolute; right: @padding-xs; @@ -139,6 +165,12 @@ } } + &-item-group-list { + margin: 0 8px; + padding: 0; + list-style: none; + } + &-submenu-title { padding-right: 26px; } @@ -164,6 +196,11 @@ cursor: not-allowed; } } + + // https://github.com/ant-design/ant-design/issues/19264 + &-submenu-selected &-submenu-title { + color: @primary-color; + } } &.slide-down-enter.slide-down-enter-active&-placement-bottomLeft, diff --git a/components/form/style/index.less b/components/form/style/index.less index 9da55d4ab..1967010e3 100644 --- a/components/form/style/index.less +++ b/components/form/style/index.less @@ -48,7 +48,7 @@ position: relative; top: -0.5px; - margin: 0 8px 0 2px; + margin: 0 @form-item-label-colon-margin-right 0 @form-item-label-colon-margin-left; } &.@{form-prefix-cls}-item-no-colon::after { @@ -137,11 +137,22 @@ form { .has-feedback { .@{ant-prefix}-input { - padding-right: 24px; + padding-right: @input-padding-horizontal-base + @input-affix-width; } - .@{ant-prefix}-input-password-icon { - margin-right: 18px; + // https://github.com/ant-design/ant-design/issues/19884 + .@{ant-prefix}-input-affix-wrapper { + .@{ant-prefix}-input-suffix { + padding-right: 18px; + } + .@{ant-prefix}-input { + padding-right: @input-padding-horizontal-base + @input-affix-width * 2; + } + &.@{ant-prefix}-input-affix-wrapper-input-with-clear-btn { + .@{ant-prefix}-input { + padding-right: @input-padding-horizontal-base + @input-affix-width * 3; + } + } } // Fix overlapping between feedback icon and