From 4b9fe8242eb0055143aabb9359f1b07f89a5c3b3 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Thu, 17 Mar 2022 10:23:09 +0800 Subject: [PATCH] style: less typo --- components/badge/style/ribbon.less | 6 +++--- components/badge/style/rtl.less | 8 ++++---- components/button/style/index.less | 4 ++-- components/button/style/mixin.less | 2 +- components/checkbox/style/mixin.less | 1 + components/date-picker/style/panel.less | 4 ++-- components/divider/style/index.less | 2 +- components/drawer/style/drawer.less | 4 ++-- components/dropdown/style/index.less | 3 +-- components/form/style/horizontal.less | 8 +++++--- components/grid/style/index.less | 23 +++++++++++++---------- components/image/style/index.less | 2 +- components/style/core/iconfont.less | 6 ++++++ components/style/mixins/iconfont.less | 2 +- 14 files changed, 43 insertions(+), 32 deletions(-) diff --git a/components/badge/style/ribbon.less b/components/badge/style/ribbon.less index b2ea714c0..6a6e366bf 100644 --- a/components/badge/style/ribbon.less +++ b/components/badge/style/ribbon.less @@ -30,7 +30,7 @@ top: 100%; width: 8px; height: 8px; - color: currentColor; + color: currentcolor; border: 4px solid; transform: scaleY(0.75); transform-origin: top; @@ -66,7 +66,7 @@ border-bottom-right-radius: 0; .@{ribbon-prefix-cls}-corner { right: 0; - border-color: currentColor transparent transparent currentColor; + border-color: currentcolor transparent transparent currentcolor; } } @@ -75,7 +75,7 @@ border-bottom-left-radius: 0; .@{ribbon-prefix-cls}-corner { left: 0; - border-color: currentColor currentColor transparent transparent; + border-color: currentcolor currentcolor transparent transparent; } } } diff --git a/components/badge/style/rtl.less b/components/badge/style/rtl.less index bcc7ce8b6..7d7c02867 100644 --- a/components/badge/style/rtl.less +++ b/components/badge/style/rtl.less @@ -42,10 +42,10 @@ .@{ribbon-prefix-cls}-corner { right: unset; left: 0; - border-color: currentColor currentColor transparent transparent; + border-color: currentcolor currentcolor transparent transparent; &::after { - border-color: currentColor currentColor transparent transparent; + border-color: currentcolor currentcolor transparent transparent; } } } @@ -57,10 +57,10 @@ .@{ribbon-prefix-cls}-corner { right: 0; left: unset; - border-color: currentColor transparent transparent currentColor; + border-color: currentcolor transparent transparent currentcolor; &::after { - border-color: currentColor transparent transparent currentColor; + border-color: currentcolor transparent transparent currentcolor; } } } diff --git a/components/button/style/index.less b/components/button/style/index.less index 5c8fa618b..cdb67c8d0 100644 --- a/components/button/style/index.less +++ b/components/button/style/index.less @@ -153,7 +153,7 @@ &.@{iconfont-css-prefix}-plus, &.@{iconfont-css-prefix}-minus { > svg { - shape-rendering: optimizeSpeed; + shape-rendering: optimizespeed; } } } @@ -256,7 +256,7 @@ letter-spacing: 0.34em; } - &-block { + &&-block { width: 100%; } diff --git a/components/button/style/mixin.less b/components/button/style/mixin.less index edb8b5b0d..96efadc8d 100644 --- a/components/button/style/mixin.less +++ b/components/button/style/mixin.less @@ -19,7 +19,7 @@ } // http://stackoverflow.com/a/17253457 > a:only-child { - color: currentColor; + color: currentcolor; &::after { position: absolute; diff --git a/components/checkbox/style/mixin.less b/components/checkbox/style/mixin.less index 60c8201a5..c16a3f091 100644 --- a/components/checkbox/style/mixin.less +++ b/components/checkbox/style/mixin.less @@ -122,6 +122,7 @@ .@{checkbox-prefix-cls}-input { cursor: not-allowed; + pointer-events: none; } .@{checkbox-inner-prefix-cls} { diff --git a/components/date-picker/style/panel.less b/components/date-picker/style/panel.less index 5c6ee0a4f..fec6899f3 100644 --- a/components/date-picker/style/panel.less +++ b/components/date-picker/style/panel.less @@ -101,7 +101,7 @@ display: inline-block; width: @picker-arrow-size; height: @picker-arrow-size; - border: 0 solid currentColor; + border: 0 solid currentcolor; border-width: 1.5px 0 0 1.5px; content: ''; } @@ -116,7 +116,7 @@ display: inline-block; width: @picker-arrow-size; height: @picker-arrow-size; - border: 0 solid currentColor; + border: 0 solid currentcolor; border-width: 1.5px 0 0 1.5px; content: ''; } diff --git a/components/divider/style/index.less b/components/divider/style/index.less index ba271e053..ff7e932ef 100644 --- a/components/divider/style/index.less +++ b/components/divider/style/index.less @@ -13,7 +13,7 @@ top: -0.06em; display: inline-block; height: 0.9em; - margin: 0 8px; + margin: 0 @divider-vertical-gutter; vertical-align: middle; border-top: 0; border-left: @border-width-base solid @divider-color; diff --git a/components/drawer/style/drawer.less b/components/drawer/style/drawer.less index 9f7dd1846..20985efdf 100644 --- a/components/drawer/style/drawer.less +++ b/components/drawer/style/drawer.less @@ -134,8 +134,8 @@ margin: 0; color: @heading-color; font-weight: 500; - font-size: @font-size-lg; - line-height: 22px; + font-size: @drawer-title-font-size; + line-height: @drawer-title-line-height; } &-content { diff --git a/components/dropdown/style/index.less b/components/dropdown/style/index.less index bb6044792..b9a6769aa 100644 --- a/components/dropdown/style/index.less +++ b/components/dropdown/style/index.less @@ -199,7 +199,6 @@ font-weight: normal; font-size: @dropdown-font-size; line-height: @dropdown-line-height; - white-space: nowrap; cursor: pointer; transition: all @animation-duration-slow; @@ -217,7 +216,7 @@ &-selected { color: @dropdown-selected-color; - background-color: @item-active-bg; + background-color: @dropdown-selected-bg; } &:hover { diff --git a/components/form/style/horizontal.less b/components/form/style/horizontal.less index f8238982a..a879c4bd7 100644 --- a/components/form/style/horizontal.less +++ b/components/form/style/horizontal.less @@ -9,10 +9,12 @@ } .@{form-item-prefix-cls}-control { flex: 1 1 0; - } - // https://github.com/ant-design/ant-design/issues/32980 - .@{form-item-prefix-cls}-control:not(.@{ant-prefix}-col) { // https://github.com/ant-design/ant-design/issues/32777 + // https://github.com/ant-design/ant-design/issues/33773 min-width: 0; } + // https://github.com/ant-design/ant-design/issues/32980 + .@{form-item-prefix-cls}-label.@{ant-prefix}-col-24 + .@{form-item-prefix-cls}-control { + min-width: unset; + } } diff --git a/components/grid/style/index.less b/components/grid/style/index.less index f5a2e874b..1d999fd8f 100644 --- a/components/grid/style/index.less +++ b/components/grid/style/index.less @@ -2,8 +2,11 @@ @import '../../style/mixins/index'; @import './mixin'; +@row-prefix-cls: ~'@{ant-prefix}-row'; +@col-prefix-cls: ~'@{ant-prefix}-col'; + // Grid system -.@{ant-prefix}-row { +.@{row-prefix-cls} { display: flex; flex-flow: row wrap; @@ -19,46 +22,46 @@ } // x轴原点 -.@{ant-prefix}-row-start { +.@{row-prefix-cls}-start { justify-content: flex-start; } // x轴居中 -.@{ant-prefix}-row-center { +.@{row-prefix-cls}-center { justify-content: center; } // x轴反方向 -.@{ant-prefix}-row-end { +.@{row-prefix-cls}-end { justify-content: flex-end; } // x轴平分 -.@{ant-prefix}-row-space-between { +.@{row-prefix-cls}-space-between { justify-content: space-between; } // x轴有间隔地平分 -.@{ant-prefix}-row-space-around { +.@{row-prefix-cls}-space-around { justify-content: space-around; } // 顶部对齐 -.@{ant-prefix}-row-top { +.@{row-prefix-cls}-top { align-items: flex-start; } // 居中对齐 -.@{ant-prefix}-row-middle { +.@{row-prefix-cls}-middle { align-items: center; } // 底部对齐 -.@{ant-prefix}-row-bottom { +.@{row-prefix-cls}-bottom { align-items: flex-end; } -.@{ant-prefix}-col { +.@{col-prefix-cls} { position: relative; max-width: 100%; // Prevent columns from collapsing when empty diff --git a/components/image/style/index.less b/components/image/style/index.less index c9ff6f0c4..3afbc0de1 100644 --- a/components/image/style/index.less +++ b/components/image/style/index.less @@ -9,9 +9,9 @@ display: inline-block; &-img { - display: block; width: 100%; height: auto; + vertical-align: middle; &-placeholder { background-color: @image-bg; diff --git a/components/style/core/iconfont.less b/components/style/core/iconfont.less index 5276148c2..f257f569c 100644 --- a/components/style/core/iconfont.less +++ b/components/style/core/iconfont.less @@ -4,6 +4,12 @@ .@{iconfont-css-prefix} { .iconfont-mixin(); + // https://github.com/ant-design/ant-design/issues/33703 + & > & { + line-height: 0; + vertical-align: 0; + } + &[tabindex] { cursor: pointer; } diff --git a/components/style/mixins/iconfont.less b/components/style/mixins/iconfont.less index 000e1ecd7..dd32dd73a 100644 --- a/components/style/mixins/iconfont.less +++ b/components/style/mixins/iconfont.less @@ -6,7 +6,7 @@ text-align: center; text-transform: none; vertical-align: -0.125em; // for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4 - text-rendering: optimizeLegibility; + text-rendering: optimizelegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;