From 0223e2ed5a0619b623098a6c24cdd116a771ea2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=8F=E5=8F=B3?= Date: Fri, 25 Dec 2020 14:31:44 +0800 Subject: [PATCH] =?UTF-8?q?=20chore(=F0=9F=86=99):=20upgrade=20less=20to?= =?UTF-8?q?=204.0.0=20(#28466)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(:up:): upgrade less to 4.0.0 * chore(:up:): upgrade bisheng to 3.0.0 * fix for less 4.0 * fix for less 4.0 * fix for less 4.0 * fix for less 4.0 * fix for less 4.0 * fix for less 4.0 * fix for less 4.0 * fix for less 4.0 * fix for less 4.0 * fix for less 4.0 * fix for less 4.0 * fix for less 4.0 * fix for less 4.0 * fix progress font size --- components/badge/style/index.less | 4 +-- components/button/style/mixin.less | 8 +++--- components/calendar/style/index.less | 4 +-- components/collapse/style/index.less | 2 +- components/date-picker/style/index.less | 22 ++++++--------- components/date-picker/style/panel.less | 8 +++--- components/date-picker/style/rtl.less | 2 +- components/drawer/style/drawer.less | 4 +-- components/dropdown/style/index.less | 2 +- components/layout/style/index.less | 2 +- components/popover/style/index.less | 6 ++-- components/progress/style/index.less | 2 +- components/radio/style/index.less | 4 +-- components/select/style/index.less | 4 +-- components/select/style/multiple.less | 4 +-- components/select/style/rtl.less | 6 ++-- components/spin/style/index.less | 18 ++++++------ components/steps/style/index.less | 2 +- components/steps/style/label-placement.less | 2 +- components/steps/style/progress-dot.less | 2 +- components/steps/style/rtl.less | 2 +- components/steps/style/small.less | 2 +- components/style/themes/compact.less | 4 +-- components/style/themes/default.less | 31 +++++++++++---------- components/switch/style/index.less | 6 ++-- components/table/style/index.less | 15 +++++----- components/table/style/size.less | 2 +- components/transfer/style/index.less | 4 +-- components/tree/style/mixin.less | 4 +-- components/tree/style/rtl.less | 2 +- components/upload/style/index.less | 2 +- package.json | 4 +-- 32 files changed, 92 insertions(+), 94 deletions(-) diff --git a/components/badge/style/index.less b/components/badge/style/index.less index 7908132e9e46..902ac634da74 100644 --- a/components/badge/style/index.less +++ b/components/badge/style/index.less @@ -23,7 +23,7 @@ white-space: nowrap; text-align: center; background: @badge-color; - border-radius: @badge-height / 2; + border-radius: (@badge-height / 2); box-shadow: 0 0 0 1px @shadow-color-inverse; a, a:hover { @@ -37,7 +37,7 @@ padding: 0; font-size: @badge-font-size-sm; line-height: @badge-height-sm; - border-radius: @badge-height-sm / 2; + border-radius: (@badge-height-sm / 2); } &-multiple-words { diff --git a/components/button/style/mixin.less b/components/button/style/mixin.less index 954c841c1199..b02434fd3e52 100644 --- a/components/button/style/mixin.less +++ b/components/button/style/mixin.less @@ -2,7 +2,7 @@ // ------------------------ .button-size(@height; @padding-horizontal; @font-size; @border-radius) { @padding-vertical: max( - round((@height - @font-size * @line-height-base) / 2 * 10) / 10 - @border-width-base, + (round(((@height - @font-size * @line-height-base) / 2) * 10) / 10) - @border-width-base, 0 ); height: @height; @@ -390,15 +390,15 @@ } // round button .btn-round(@btnClassName: btn) { - .button-size(@btn-circle-size; @btn-circle-size / 2; @font-size-base; @btn-circle-size); + .button-size(@btn-circle-size; (@btn-circle-size / 2); @font-size-base; @btn-circle-size); &.@{btnClassName}-lg { .button-size( - @btn-circle-size-lg; @btn-circle-size-lg / 2; @btn-font-size-lg; @btn-circle-size-lg + @btn-circle-size-lg; (@btn-circle-size-lg / 2); @btn-font-size-lg; @btn-circle-size-lg ); } &.@{btnClassName}-sm { .button-size( - @btn-circle-size-sm; @btn-circle-size-sm / 2; @font-size-base; @btn-circle-size-sm + @btn-circle-size-sm; (@btn-circle-size-sm / 2); @font-size-base; @btn-circle-size-sm ); } } diff --git a/components/calendar/style/index.less b/components/calendar/style/index.less index 48d4b540516c..af0e8a4a6d2c 100644 --- a/components/calendar/style/index.less +++ b/components/calendar/style/index.less @@ -128,8 +128,8 @@ display: block; width: auto; height: auto; - margin: 0 @padding-xs / 2; - padding: @padding-xs / 2 @padding-xs 0; + margin: 0 (@padding-xs / 2); + padding: (@padding-xs / 2) @padding-xs 0; border: 0; border-top: 2px solid @border-color-split; border-radius: 0; diff --git a/components/collapse/style/index.less b/components/collapse/style/index.less index bb4a32b4726e..4643918ebc7f 100644 --- a/components/collapse/style/index.less +++ b/components/collapse/style/index.less @@ -35,7 +35,7 @@ .iconfont-mixin(); position: absolute; - top: (@font-size-base * @line-height-base - @font-size-sm) / 2; + top: ((@font-size-base * @line-height-base - @font-size-sm) / 2); left: @collapse-header-arrow-left; display: inline-block; padding: @collapse-header-padding; diff --git a/components/date-picker/style/index.less b/components/date-picker/style/index.less index f4141a72d17f..b9c2297dc09c 100644 --- a/components/date-picker/style/index.less +++ b/components/date-picker/style/index.less @@ -7,18 +7,12 @@ .picker-padding(@input-height, @font-size, @padding-horizontal) { // font height probably 22.0001, So use floor better @font-height: floor(@font-size * @line-height-base) + 2; - @padding-top: max((@input-height - @font-height) / 2, 0); + @padding-top: max(((@input-height - @font-height) / 2), 0); @padding-bottom: max(@input-height - @font-height - @padding-top, 0); padding: @padding-top @padding-horizontal @padding-bottom; } .@{picker-prefix-cls} { - @vertical-fix-base: @input-height-base - ceil(@font-size-base * @line-height-base) - 2 * - @input-padding-vertical-base - 2 * @border-width-base; - @vertical-fix-lg: @input-height-lg - ceil(@font-size-lg * @line-height-base) - 2 * - @input-padding-vertical-lg - 2 * @border-width-base; - @vertical-fix-sm: @input-height-sm - ceil(@font-size-base * @line-height-base) - 2 * - @input-padding-vertical-sm - 2 * @border-width-base; @arrow-size: 10px; .reset-component(); @@ -113,7 +107,7 @@ &-suffix { align-self: center; - margin-left: @padding-xs / 2; + margin-left: (@padding-xs / 2); color: @disabled-color; line-height: 1; pointer-events: none; @@ -227,7 +221,7 @@ &-placement-bottomLeft { .@{picker-prefix-cls}-range-arrow { - top: @arrow-size / 2 - @arrow-size / 3; + top: (@arrow-size / 2) - (@arrow-size / 3); display: block; transform: rotate(-45deg); } @@ -235,7 +229,7 @@ &-placement-topLeft { .@{picker-prefix-cls}-range-arrow { - bottom: @arrow-size / 2 - @arrow-size / 3; + bottom: (@arrow-size / 2) - (@arrow-size / 3); display: block; transform: rotate(135deg); } @@ -276,15 +270,15 @@ // Time picker with additional style &-dropdown &-panel > &-time-panel { - padding-top: @padding-xs / 2; + padding-top: (@padding-xs / 2); } // ======================== Ranges ======================== &-ranges { margin-bottom: 0; - padding: @padding-xs / 2 @padding-sm; + padding: (@padding-xs / 2) @padding-sm; overflow: hidden; - line-height: @picker-text-height - 2 * @border-width-base - @padding-xs / 2; + line-height: @picker-text-height - 2 * @border-width-base - (@padding-xs / 2); text-align: left; list-style: none; @@ -326,7 +320,7 @@ right: @border-width-base; width: @arrow-size; height: @arrow-size; - border: @arrow-size / 2 solid @border-color-split; + border: (@arrow-size / 2) solid @border-color-split; border-color: @calendar-bg @calendar-bg transparent transparent; content: ''; } diff --git a/components/date-picker/style/panel.less b/components/date-picker/style/panel.less index d66a0f21dbfc..b8bd76fc3cc9 100644 --- a/components/date-picker/style/panel.less +++ b/components/date-picker/style/panel.less @@ -111,8 +111,8 @@ &-super-next-icon { &::after { position: absolute; - top: ceil(@picker-arrow-size / 2); - left: ceil(@picker-arrow-size / 2); + top: ceil((@picker-arrow-size / 2)); + left: ceil((@picker-arrow-size / 2)); display: inline-block; width: @picker-arrow-size; height: @picker-arrow-size; @@ -463,8 +463,8 @@ &-quarter-panel, &-month-panel { @hover-cell-fixed-distance: ( - (@picker-panel-width - @padding-xs * 2) / 3 - @picker-year-month-cell-width - ) / 2; + (((@picker-panel-width - @padding-xs * 2) / 3) - @picker-year-month-cell-width) / 2 + ); .@{picker-prefix-cls}-body { padding: 0 @padding-xs; diff --git a/components/date-picker/style/rtl.less b/components/date-picker/style/rtl.less index c2f24a63d00a..8112c71d5ef1 100644 --- a/components/date-picker/style/rtl.less +++ b/components/date-picker/style/rtl.less @@ -5,7 +5,7 @@ &-suffix { .@{picker-prefix-cls}-rtl & { - margin-right: @padding-xs / 2; + margin-right: (@padding-xs / 2); margin-left: 0; } } diff --git a/components/drawer/style/drawer.less b/components/drawer/style/drawer.less index ab7a803578fa..cf07d558e738 100644 --- a/components/drawer/style/drawer.less +++ b/components/drawer/style/drawer.less @@ -4,7 +4,7 @@ @picker-prefix-cls: ~'@{ant-prefix}-picker'; .@{drawer-prefix-cls} { - @drawer-header-close-padding: ceil((@drawer-header-close-size - @font-size-lg) / 2); + @drawer-header-close-padding: ceil(((@drawer-header-close-size - @font-size-lg) / 2)); position: fixed; z-index: @zindex-modal; @@ -178,7 +178,7 @@ .@{drawer-prefix-cls}-header-no-title & { margin-right: var(--scroll-bar); /* stylelint-disable-next-line function-calc-no-invalid */ - padding-right: calc(@drawer-header-close-padding - var(--scroll-bar)); + padding-right: ~'calc(@{drawer-header-close-padding} - var(--scroll-bar))'; } } diff --git a/components/dropdown/style/index.less b/components/dropdown/style/index.less index 53199454503e..602fd730e845 100644 --- a/components/dropdown/style/index.less +++ b/components/dropdown/style/index.less @@ -71,7 +71,7 @@ height: sqrt(@popover-arrow-width * @popover-arrow-width * 2); background: transparent; border-style: solid; - border-width: sqrt(@popover-arrow-width * @popover-arrow-width * 2) / 2; + border-width: (sqrt(@popover-arrow-width * @popover-arrow-width * 2) / 2); transform: rotate(45deg); } diff --git a/components/layout/style/index.less b/components/layout/style/index.less index e6c7243969c9..75b91938e2f5 100644 --- a/components/layout/style/index.less +++ b/components/layout/style/index.less @@ -102,7 +102,7 @@ width: @layout-zero-trigger-width; height: @layout-zero-trigger-height; color: @layout-trigger-color; - font-size: @layout-zero-trigger-width / 2; + font-size: (@layout-zero-trigger-width / 2); line-height: @layout-zero-trigger-height; text-align: center; background: @layout-sider-background; diff --git a/components/popover/style/index.less b/components/popover/style/index.less index a981c1c15cbb..0e5de4d2c0b3 100644 --- a/components/popover/style/index.less +++ b/components/popover/style/index.less @@ -88,7 +88,9 @@ font-size: @font-size-base; > .@{iconfont-css-prefix} { position: absolute; - top: 4px + (@line-height-base * @font-size-base - @font-size-base)/2; // 4px for padding-top, 4px for vertical middle; + top: ( + 4px + ((@line-height-base * @font-size-base - @font-size-base) / 2) + ); // 4px for padding-top, 4px for vertical middle color: @warning-color; font-size: @font-size-base; } @@ -116,7 +118,7 @@ height: sqrt(@popover-arrow-width * @popover-arrow-width * 2); background: transparent; border-style: solid; - border-width: sqrt(@popover-arrow-width * @popover-arrow-width * 2) / 2; + border-width: (sqrt(@popover-arrow-width * @popover-arrow-width * 2) / 2); transform: rotate(45deg); } diff --git a/components/progress/style/index.less b/components/progress/style/index.less index c44dd8bef7ed..0903b999c63f 100644 --- a/components/progress/style/index.less +++ b/components/progress/style/index.less @@ -171,7 +171,7 @@ transform: translate(-50%, -50%); .@{iconfont-css-prefix} { - font-size: 14 / 12em; + font-size: (14 / 12em); } } diff --git a/components/radio/style/index.less b/components/radio/style/index.less index f80a75a8a651..321fe0b47427 100644 --- a/components/radio/style/index.less +++ b/components/radio/style/index.less @@ -79,8 +79,8 @@ &-inner { &::after { position: absolute; - top: (@radio-size - @radio-dot-size) / 2 - @radio-border-width; - left: (@radio-size - @radio-dot-size) / 2 - @radio-border-width; + top: ((@radio-size - @radio-dot-size) / 2) - @radio-border-width; + left: ((@radio-size - @radio-dot-size) / 2) - @radio-border-width; display: table; width: @radio-dot-size; height: @radio-dot-size; diff --git a/components/select/style/index.less b/components/select/style/index.less index ab630fa57c14..292775335994 100644 --- a/components/select/style/index.less +++ b/components/select/style/index.less @@ -116,7 +116,7 @@ right: @control-padding-horizontal - 1px; width: @font-size-sm; height: @font-size-sm; - margin-top: -@font-size-sm / 2; + margin-top: (-@font-size-sm / 2); color: @disabled-color; font-size: @font-size-sm; line-height: 1; @@ -150,7 +150,7 @@ display: inline-block; width: @font-size-sm; height: @font-size-sm; - margin-top: -@font-size-sm / 2; + margin-top: (-@font-size-sm / 2); color: @disabled-color; font-size: @font-size-sm; font-style: normal; diff --git a/components/select/style/multiple.less b/components/select/style/multiple.less index a8cf390a96c0..a3a79b9af4dd 100644 --- a/components/select/style/multiple.less +++ b/components/select/style/multiple.less @@ -76,7 +76,7 @@ // It's ok not to do this, but 24px makes bottom narrow in view should adjust &-content { display: inline-block; - margin-right: @padding-xs / 2; + margin-right: (@padding-xs / 2); overflow: hidden; white-space: pre; // fix whitespace wrapping. custom tags display all whitespace within. text-overflow: ellipsis; @@ -104,7 +104,7 @@ // ========================== Input ========================== .@{select-prefix-cls}-selection-search { position: relative; - margin-left: @select-multiple-padding / 2; + margin-left: (@select-multiple-padding / 2); &-input, &-mirror { diff --git a/components/select/style/rtl.less b/components/select/style/rtl.less index 78dae7731d66..86847296aa04 100644 --- a/components/select/style/rtl.less +++ b/components/select/style/rtl.less @@ -47,7 +47,7 @@ // multiple @select-multiple-item-border-width: 1px; -@select-multiple-item-spacing-half: ceil(@input-padding-vertical-base / 2); +@select-multiple-item-spacing-half: ceil((@input-padding-vertical-base / 2)); @select-multiple-padding: max( @input-padding-vertical-base - @select-multiple-item-border-width - @select-multiple-item-spacing-half, @@ -75,7 +75,7 @@ &-content { .@{select-prefix-cls}-rtl& { margin-right: 0; - margin-left: @padding-xs / 2; + margin-left: (@padding-xs / 2); text-align: right; } } @@ -84,7 +84,7 @@ // ========================== Input ========================== .@{select-prefix-cls}-selection-search { .@{select-prefix-cls}-rtl& { - margin-right: @select-multiple-padding / 2; + margin-right: (@select-multiple-padding / 2); margin-left: @input-padding-vertical-base; } diff --git a/components/spin/style/index.less b/components/spin/style/index.less index 8647ce30675c..c64d29ea8ceb 100644 --- a/components/spin/style/index.less +++ b/components/spin/style/index.less @@ -36,41 +36,41 @@ position: absolute; top: 50%; left: 50%; - margin: -@spin-dot-size / 2; + margin: -(@spin-dot-size / 2); } .@{spin-prefix-cls}-text { position: absolute; top: 50%; width: 100%; - padding-top: (@spin-dot-size - @font-size-base) / 2 + 2px; + padding-top: ((@spin-dot-size - @font-size-base) / 2) + 2px; text-shadow: 0 1px 2px @shadow-color-inverse; } &.@{spin-prefix-cls}-show-text .@{spin-prefix-cls}-dot { - margin-top: -@spin-dot-size / 2 - 10px; + margin-top: -(@spin-dot-size / 2) - 10px; } } > div > .@{spin-prefix-cls}-sm { .@{spin-prefix-cls}-dot { - margin: -@spin-dot-size-sm / 2; + margin: -(@spin-dot-size-sm / 2); } .@{spin-prefix-cls}-text { - padding-top: (@spin-dot-size-sm - @font-size-base) / 2 + 2px; + padding-top: ((@spin-dot-size-sm - @font-size-base) / 2) + 2px; } &.@{spin-prefix-cls}-show-text .@{spin-prefix-cls}-dot { - margin-top: -@spin-dot-size-sm / 2 - 10px; + margin-top: -(@spin-dot-size-sm / 2) - 10px; } } > div > .@{spin-prefix-cls}-lg { .@{spin-prefix-cls}-dot { - margin: -@spin-dot-size-lg / 2; + margin: -(@spin-dot-size-lg / 2); } .@{spin-prefix-cls}-text { - padding-top: (@spin-dot-size-lg - @font-size-base) / 2 + 2px; + padding-top: ((@spin-dot-size-lg - @font-size-base) / 2) + 2px; } &.@{spin-prefix-cls}-show-text .@{spin-prefix-cls}-dot { - margin-top: -@spin-dot-size-lg / 2 - 10px; + margin-top: -(@spin-dot-size-lg / 2) - 10px; } } } diff --git a/components/steps/style/index.less b/components/steps/style/index.less index 8b250372a191..c439b30f5df1 100644 --- a/components/steps/style/index.less +++ b/components/steps/style/index.less @@ -101,7 +101,7 @@ &::after { position: absolute; - top: @steps-title-line-height / 2; + top: (@steps-title-line-height / 2); left: 100%; display: block; width: 9999px; diff --git a/components/steps/style/label-placement.less b/components/steps/style/label-placement.less index df92565d7d4b..606ba0880b53 100644 --- a/components/steps/style/label-placement.less +++ b/components/steps/style/label-placement.less @@ -7,7 +7,7 @@ } &-content { display: block; - width: (@steps-icon-size / 2 + 42px) * 2; + width: ((@steps-icon-size / 2) + 42px) * 2; margin-top: 8px; text-align: center; } diff --git a/components/steps/style/progress-dot.less b/components/steps/style/progress-dot.less index 913ab5d40ba3..2c9dcb405625 100644 --- a/components/steps/style/progress-dot.less +++ b/components/steps/style/progress-dot.less @@ -7,7 +7,7 @@ &-tail { top: @steps-dot-top; width: 100%; - margin: 0 0 0 @steps-description-max-width / 2; + margin: 0 0 0 (@steps-description-max-width / 2); padding: 0; &::after { diff --git a/components/steps/style/rtl.less b/components/steps/style/rtl.less index 054b39f55c8c..2f8220892c7f 100644 --- a/components/steps/style/rtl.less +++ b/components/steps/style/rtl.less @@ -177,7 +177,7 @@ .@{steps-prefix-cls}-item { &-tail { .@{steps-prefix-cls}-rtl& { - margin: 0 @steps-description-max-width / 2 0 0; + margin: 0 (@steps-description-max-width / 2) 0 0; } &::after { diff --git a/components/steps/style/small.less b/components/steps/style/small.less index 6c50ab3ecea6..344e37aed8ab 100644 --- a/components/steps/style/small.less +++ b/components/steps/style/small.less @@ -21,7 +21,7 @@ font-size: @font-size-base; line-height: @steps-small-icon-size; &::after { - top: @steps-small-icon-size / 2; + top: (@steps-small-icon-size / 2); } } .@{steps-prefix-cls}-item-description { diff --git a/components/style/themes/compact.less b/components/style/themes/compact.less index b57f64d3dd3d..fc40996dff82 100644 --- a/components/style/themes/compact.less +++ b/components/style/themes/compact.less @@ -105,7 +105,7 @@ // --- @input-padding-vertical-base: round( max( - round((@input-height-base - @font-size-base * @line-height-base) / 2 * 10) / 10 - + (round(((@input-height-base - @font-size-base * @line-height-base) / 2) * 10) / 10) - @border-width-base, 2px ) @@ -231,7 +231,7 @@ // --- @alert-with-description-no-icon-padding-vertical: 7px; @alert-with-description-padding-vertical: 11px; -@alert-icon-top: 7px + @font-size-base * @line-height-base / 2 - @font-size-base / 2; +@alert-icon-top: 7px + @font-size-base * (@line-height-base / 2) - (@font-size-base / 2); @alert-with-description-icon-size: 20px; // Skeleton diff --git a/components/style/themes/default.less b/components/style/themes/default.less index 4d7734e9ab3a..d61ac7aeef79 100644 --- a/components/style/themes/default.less +++ b/components/style/themes/default.less @@ -388,16 +388,18 @@ @input-padding-horizontal-sm: @control-padding-horizontal-sm - 1px; @input-padding-horizontal-lg: @input-padding-horizontal; @input-padding-vertical-base: max( - round((@input-height-base - @font-size-base * @line-height-base) / 2 * 10) / 10 - + (round(((@input-height-base - @font-size-base * @line-height-base) / 2) * 10) / 10) - @border-width-base, 3px ); @input-padding-vertical-sm: max( - round((@input-height-sm - @font-size-base * @line-height-base) / 2 * 10) / 10 - @border-width-base, + (round(((@input-height-sm - @font-size-base * @line-height-base) / 2) * 10) / 10) - + @border-width-base, 0 ); -@input-padding-vertical-lg: ceil((@input-height-lg - @font-size-lg * @line-height-base) / 2 * 10) / - 10 - @border-width-base; +@input-padding-vertical-lg: ( + ceil(((@input-height-lg - @font-size-lg * @line-height-base) / 2) * 10) / 10 + ) - @border-width-base; @input-placeholder-color: hsv(0, 0, 75%); @input-color: @text-color; @input-icon-color: @input-color; @@ -439,7 +441,7 @@ @select-single-item-height-lg: 40px; @select-multiple-item-height: @input-height-base - @input-padding-vertical-base * 2; // Normal 24px @select-multiple-item-height-lg: 32px; -@select-multiple-item-spacing-half: ceil(@input-padding-vertical-base / 2); +@select-multiple-item-spacing-half: ceil((@input-padding-vertical-base / 2)); @select-multiple-disabled-background: @input-disabled-bg; @select-multiple-item-disabled-color: #bfbfbf; @select-multiple-item-disabled-border-color: @select-border-color; @@ -593,10 +595,10 @@ @table-expanded-row-bg: #fbfbfb; @table-padding-vertical: 16px; @table-padding-horizontal: 16px; -@table-padding-vertical-md: @table-padding-vertical * 3 / 4; -@table-padding-horizontal-md: @table-padding-horizontal / 2; -@table-padding-vertical-sm: @table-padding-vertical / 2; -@table-padding-horizontal-sm: @table-padding-horizontal / 2; +@table-padding-vertical-md: (@table-padding-vertical * 3 / 4); +@table-padding-horizontal-md: (@table-padding-horizontal / 2); +@table-padding-vertical-sm: (@table-padding-vertical / 2); +@table-padding-horizontal-sm: (@table-padding-horizontal / 2); @table-border-radius-base: @border-radius-base; @table-footer-bg: @background-color-light; @table-footer-color: @heading-color; @@ -683,12 +685,12 @@ @card-head-font-size: @font-size-lg; @card-head-font-size-sm: @font-size-base; @card-head-padding: 16px; -@card-head-padding-sm: @card-head-padding / 2; +@card-head-padding-sm: (@card-head-padding / 2); @card-head-height: 48px; @card-head-height-sm: 36px; @card-inner-head-padding: 12px; @card-padding-base: 24px; -@card-padding-base-sm: @card-padding-base / 2; +@card-padding-base-sm: (@card-padding-base / 2); @card-actions-background: @component-background; @card-actions-li-margin: 12px 0; @card-skeleton-bg: #cfd8dc; @@ -719,8 +721,9 @@ @tabs-card-head-background: @background-color-light; @tabs-card-height: 40px; @tabs-card-active-color: @primary-color; -@tabs-card-horizontal-padding: (@tabs-card-height - floor(@font-size-base * @line-height-base)) / 2 - - @border-width-base @padding-md; +@tabs-card-horizontal-padding: ( + (@tabs-card-height - floor(@font-size-base * @line-height-base)) / 2 + ) - @border-width-base @padding-md; @tabs-card-horizontal-padding-sm: 6px @padding-md; @tabs-card-horizontal-padding-lg: 7px @padding-md 6px; @tabs-title-font-size: @font-size-base; @@ -908,7 +911,7 @@ @alert-with-description-padding-vertical: @padding-md - 1px; @alert-with-description-padding: @alert-with-description-padding-vertical 15px @alert-with-description-no-icon-padding-vertical @alert-with-description-icon-size; -@alert-icon-top: 8px + @font-size-base * @line-height-base / 2 - @font-size-base / 2; +@alert-icon-top: 8px + @font-size-base * (@line-height-base / 2) - (@font-size-base / 2); @alert-with-description-icon-size: 24px; // List diff --git a/components/switch/style/index.less b/components/switch/style/index.less index a97e99f0b52e..e4ea539e7434 100644 --- a/components/switch/style/index.less +++ b/components/switch/style/index.less @@ -80,7 +80,7 @@ bottom: 0; left: 0; background-color: @switch-bg; - border-radius: @switch-pin-size / 2; + border-radius: (@switch-pin-size / 2); box-shadow: 0 2px 4px 0 @switch-shadow-color; transition: all @switch-duration ease-in-out; content: ''; @@ -108,7 +108,7 @@ // ======================== Loading ========================= &-loading-icon { position: relative; - top: (@switch-pin-size - @font-size-base) / 2; + top: ((@switch-pin-size - @font-size-base) / 2); color: rgba(0, 0, 0, 0.65); vertical-align: top; } @@ -134,7 +134,7 @@ } .@{switch-prefix-cls}-loading-icon { - top: (@switch-sm-pin-size - 9px) / 2; + top: ((@switch-sm-pin-size - 9px) / 2); font-size: 9px; } diff --git a/components/table/style/index.less b/components/table/style/index.less index ffa37fe4b54c..91087f887355 100644 --- a/components/table/style/index.less +++ b/components/table/style/index.less @@ -417,13 +417,12 @@ float: left; box-sizing: border-box; - width: ceil((@font-size-sm * 1.4 - @border-width-base * 3) / 2) * 2 + @border-width-base * 3; - height: ceil((@font-size-sm * 1.4 - @border-width-base * 3) / 2) * 2 + @border-width-base * 3; + width: ceil(((@font-size-sm * 1.4 - @border-width-base * 3) / 2)) * 2 + @border-width-base * 3; + height: ceil(((@font-size-sm * 1.4 - @border-width-base * 3) / 2)) * 2 + @border-width-base * 3; padding: 0; color: inherit; - line-height: ceil((@font-size-sm * 1.4 - @border-width-base * 3) / 2) * 2 + @border-width-base * + line-height: ceil(((@font-size-sm * 1.4 - @border-width-base * 3) / 2)) * 2 + @border-width-base * 3; - // vertical-align: floor((@font-size-base - ceil(@font-size-sm * 1.4)) / 2); background: @table-expand-icon-bg; border: @border-width-base @border-style-base @border-color-split; border-radius: @border-radius-base; @@ -446,7 +445,7 @@ } &::before { - top: ceil((@font-size-sm * 1.4 - @border-width-base * 3) / 2); + top: ceil(((@font-size-sm * 1.4 - @border-width-base * 3) / 2)); right: 3px; left: 3px; height: @border-width-base; @@ -455,7 +454,7 @@ &::after { top: 3px; bottom: 3px; - left: ceil((@font-size-sm * 1.4 - @border-width-base * 3) / 2); + left: ceil(((@font-size-sm * 1.4 - @border-width-base * 3) / 2)); width: @border-width-base; transform: rotate(90deg); } @@ -480,8 +479,8 @@ } .@{table-prefix-cls}-row-indent + & { - margin-top: (@font-size-base * @line-height-base - @border-width-base * 3) / 2 - - ceil((@font-size-sm * 1.4 - @border-width-base * 3) / 2); + margin-top: ((@font-size-base * @line-height-base - @border-width-base * 3) / 2) - + ceil(((@font-size-sm * 1.4 - @border-width-base * 3) / 2)); margin-right: @padding-xs; } } diff --git a/components/table/style/size.less b/components/table/style/size.less index b1da0daac2b6..5966eb451235 100644 --- a/components/table/style/size.less +++ b/components/table/style/size.less @@ -40,7 +40,7 @@ .@{table-prefix-cls}-wrapper:only-child { .@{table-prefix-cls} { margin: -@padding-vertical -@padding-horizontal -@padding-vertical (@padding-horizontal + - ceil(@font-size-sm * 1.4)); + ceil((@font-size-sm * 1.4))); } } } diff --git a/components/transfer/style/index.less b/components/transfer/style/index.less index 5b3e26ed376a..505ffd870a7f 100644 --- a/components/transfer/style/index.less +++ b/components/transfer/style/index.less @@ -6,7 +6,7 @@ @transfer-prefix-cls: ~'@{ant-prefix}-transfer'; @transfer-header-vertical-padding: ceil( - (@transfer-header-height - 1px - @font-size-base * @line-height-base) / 2 + ((@transfer-header-height - 1px - @font-size-base * @line-height-base) / 2) ); .@{transfer-prefix-cls} { @@ -234,7 +234,7 @@ } .@{ant-prefix}-empty-image { - max-height: @transfer-header-height / 2 - 22; + max-height: (@transfer-header-height / 2) - 22; } } diff --git a/components/tree/style/mixin.less b/components/tree/style/mixin.less index a2e79fca19c2..1a7f3121ab4a 100644 --- a/components/tree/style/mixin.less +++ b/components/tree/style/mixin.less @@ -4,7 +4,7 @@ @tree-node-prefix-cls: ~'@{tree-prefix-cls}-treenode'; @select-tree-prefix-cls: ~'@{ant-prefix}-select-tree'; @tree-motion: ~'@{ant-prefix}-motion-collapse'; -@tree-node-padding: @padding-xs / 2; +@tree-node-padding: (@padding-xs / 2); .antTreeSwitcherIcon(@type: 'tree-default-open-icon') { .@{tree-prefix-cls}-switcher-icon, @@ -230,7 +230,7 @@ &::before { position: absolute; top: 0; - right: @tree-title-height / 2; + right: (@tree-title-height / 2); bottom: -@tree-node-padding; border-right: 1px solid @border-color-base; content: ''; diff --git a/components/tree/style/rtl.less b/components/tree/style/rtl.less index 634bd93335e0..bc985c956b0e 100644 --- a/components/tree/style/rtl.less +++ b/components/tree/style/rtl.less @@ -46,7 +46,7 @@ &::before { .@{tree-prefix-cls}-rtl& { right: auto; - left: -@tree-title-height / 2 - 1px; + left: -(@tree-title-height / 2) - 1px; border-right: none; border-left: 1px solid @border-color-base; } diff --git a/components/upload/style/index.less b/components/upload/style/index.less index 99e5c6b87e34..bc4f939365b7 100644 --- a/components/upload/style/index.less +++ b/components/upload/style/index.less @@ -201,7 +201,7 @@ .@{upload-prefix-cls}-text-icon { .@{iconfont-css-prefix} { position: absolute; - top: @font-size-base / 2 - 2px; + top: (@font-size-base / 2) - 2px; color: @text-color-secondary; font-size: @font-size-base; } diff --git a/package.json b/package.json index d5a7b5f1ca28..669fb97f4812 100644 --- a/package.json +++ b/package.json @@ -153,7 +153,7 @@ "devDependencies": { "@ant-design/bisheng-plugin": "^2.3.0", "@ant-design/hitu": "^0.0.0-alpha.13", - "@ant-design/tools": "^11.0.4", + "@ant-design/tools": "^13.0.0", "@qixian.cs/github-contributors-list": "^1.0.3", "@stackblitz/sdk": "^1.3.0", "@types/classnames": "^2.2.8", @@ -180,7 +180,7 @@ "array-move": "^3.0.0", "babel-eslint": "^10.0.1", "babel-plugin-add-react-displayname": "^0.0.5", - "bisheng": "^2.0.0", + "bisheng": "^3.0.0", "bisheng-plugin-description": "^0.1.4", "bisheng-plugin-react": "^1.1.2", "bisheng-plugin-toc": "^0.4.4",