Skip to content

Commit

Permalink
chore(πŸ†™): upgrade less to 4.0.0 (ant-design#28466)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
afc163 authored Dec 25, 2020
1 parent c62b7a9 commit 0223e2e
Show file tree
Hide file tree
Showing 32 changed files with 92 additions and 94 deletions.
4 changes: 2 additions & 2 deletions components/badge/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions components/button/style/mixin.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions components/calendar/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion components/collapse/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
22 changes: 8 additions & 14 deletions components/date-picker/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -227,15 +221,15 @@

&-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);
}
}

&-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);
}
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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: '';
}
Expand Down
8 changes: 4 additions & 4 deletions components/date-picker/style/panel.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion components/date-picker/style/rtl.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

&-suffix {
.@{picker-prefix-cls}-rtl & {
margin-right: @padding-xs / 2;
margin-right: (@padding-xs / 2);
margin-left: 0;
}
}
Expand Down
4 changes: 2 additions & 2 deletions components/drawer/style/drawer.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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))';
}
}

Expand Down
2 changes: 1 addition & 1 deletion components/dropdown/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion components/layout/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 4 additions & 2 deletions components/popover/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion components/progress/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
transform: translate(-50%, -50%);

.@{iconfont-css-prefix} {
font-size: 14 / 12em;
font-size: (14 / 12em);
}
}

Expand Down
4 changes: 2 additions & 2 deletions components/radio/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions components/select/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions components/select/style/multiple.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions components/select/style/rtl.less
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
}
}
Expand All @@ -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;
}

Expand Down
18 changes: 9 additions & 9 deletions components/spin/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/steps/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion components/steps/style/label-placement.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion components/steps/style/progress-dot.less
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion components/steps/style/rtl.less
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading

0 comments on commit 0223e2e

Please sign in to comment.