Skip to content

Commit

Permalink
chore: sync ant-design v4.18.8 (#7273)
Browse files Browse the repository at this point in the history
Co-authored-by: ng-zorro-bot <ng-zorro-bot@users.noreply.github.com>
  • Loading branch information
ng-zorro-bot and ng-zorro-bot committed Apr 20, 2022
1 parent 64e1c7c commit 8d8daaa
Show file tree
Hide file tree
Showing 31 changed files with 261 additions and 56 deletions.
6 changes: 3 additions & 3 deletions components/badge/style/ribbon.less
Expand Up @@ -30,7 +30,7 @@
top: 100%;
width: 8px;
height: 8px;
color: currentColor;
color: currentcolor;
border: 4px solid;
transform: scaleY(0.75);
transform-origin: top;
Expand Down Expand Up @@ -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;
}
}

Expand All @@ -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;
}
}
}
8 changes: 4 additions & 4 deletions components/badge/style/rtl.less
Expand Up @@ -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;
}
}
}
Expand All @@ -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;
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions components/button/style/index.less
Expand Up @@ -18,7 +18,7 @@
// 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
// 0.001px solution works and I don't know why
line-height: @btn-line-height;
.btn();
.btn-default();
Expand Down Expand Up @@ -153,7 +153,7 @@
&.@{iconfont-css-prefix}-plus,
&.@{iconfont-css-prefix}-minus {
> svg {
shape-rendering: optimizeSpeed;
shape-rendering: optimizespeed;
}
}
}
Expand Down Expand Up @@ -256,7 +256,7 @@
letter-spacing: 0.34em;
}

&-block {
&&-block {
width: 100%;
}

Expand Down
2 changes: 1 addition & 1 deletion components/button/style/mixin.less
Expand Up @@ -19,7 +19,7 @@
}
// http://stackoverflow.com/a/17253457
> a:only-child {
color: currentColor;
color: currentcolor;

&::after {
position: absolute;
Expand Down
1 change: 1 addition & 0 deletions components/checkbox/style/mixin.less
Expand Up @@ -122,6 +122,7 @@

.@{checkbox-prefix-cls}-input {
cursor: not-allowed;
pointer-events: none;
}

.@{checkbox-inner-prefix-cls} {
Expand Down
4 changes: 2 additions & 2 deletions components/date-picker/style/panel.less
Expand Up @@ -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: '';
}
Expand All @@ -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: '';
}
Expand Down
1 change: 0 additions & 1 deletion components/descriptions/style/index.less
Expand Up @@ -29,7 +29,6 @@

&-view {
width: 100%;
overflow: hidden;
border-radius: @border-radius-base;

table {
Expand Down
30 changes: 28 additions & 2 deletions components/divider/style/index.less
Expand Up @@ -89,8 +89,6 @@
}

&-horizontal&-with-text&-dashed {
border-top: 0;

&::before,
&::after {
border-style: dashed none none;
Expand All @@ -106,6 +104,34 @@
font-weight: normal;
font-size: @font-size-base;
}

&-horizontal&-with-text-left&-no-default-orientation-margin-left {
&::before {
width: 0;
}

&::after {
width: 100%;
}

.ant-divider-inner-text {
padding-left: 0;
}
}

&-horizontal&-with-text-right&-no-default-orientation-margin-right {
&::before {
width: 100%;
}

&::after {
width: 0;
}

.ant-divider-inner-text {
padding-right: 0;
}
}
}

@import './rtl';
19 changes: 15 additions & 4 deletions components/dropdown/style/index.less
Expand Up @@ -341,10 +341,21 @@
.@{dropdown-prefix-cls}-button {
white-space: nowrap;

&.@{ant-prefix}-btn-group
> .@{ant-prefix}-btn:last-child:not(:first-child):not(.@{ant-prefix}-btn-icon-only) {
padding-right: @padding-xs;
padding-left: @padding-xs;
&.@{ant-prefix}-btn-group > .@{ant-prefix}-btn {
&-loading,
&-loading + .@{ant-prefix}-btn {
cursor: default;
pointer-events: none;
}

&-loading + .@{ant-prefix}-btn::before {
display: block;
}

&:last-child:not(:first-child):not(.@{ant-prefix}-btn-icon-only) {
padding-right: @padding-xs;
padding-left: @padding-xs;
}
}
}

Expand Down
8 changes: 5 additions & 3 deletions components/form/style/horizontal.less
Expand Up @@ -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;
}
}
6 changes: 6 additions & 0 deletions components/form/style/index.less
Expand Up @@ -91,6 +91,12 @@
text-align: left;
}

&-wrap {
overflow: unset;
line-height: (@line-height-base - 0.25em);
white-space: unset;
}

> label {
position: relative;
display: inline-flex;
Expand Down
6 changes: 4 additions & 2 deletions components/form/style/mixin.less
Expand Up @@ -12,7 +12,8 @@
}
// 输入框的不同校验状态
:not(.@{ant-prefix}-input-disabled):not(.@{ant-prefix}-input-borderless).@{ant-prefix}-input,
:not(.@{ant-prefix}-input-affix-wrapper-disabled):not(.@{ant-prefix}-input-affix-wrapper-borderless).@{ant-prefix}-input-affix-wrapper {
:not(.@{ant-prefix}-input-affix-wrapper-disabled):not(.@{ant-prefix}-input-affix-wrapper-borderless).@{ant-prefix}-input-affix-wrapper,
:not(.@{ant-prefix}-input-number-affix-wrapper-disabled):not(.@{ant-prefix}-input-number-affix-wrapper-borderless).@{ant-prefix}-input-number-affix-wrapper {
&,
&:hover {
background-color: @background-color;
Expand All @@ -29,7 +30,8 @@
.active(@border-color, @hoverBorderColor, @outlineColor);
}

.@{ant-prefix}-input-prefix {
.@{ant-prefix}-input-prefix,
.@{ant-prefix}-input-number-prefix {
color: @text-color;
}

Expand Down
8 changes: 8 additions & 0 deletions components/form/style/rtl.less
Expand Up @@ -80,6 +80,14 @@
}
}

.@{ant-prefix}-input-number-affix-wrapper {
.@{ant-prefix}-input-number {
.@{form-prefix-cls}-rtl & {
padding: 0;
}
}
}

.@{ant-prefix}-input-search:not(.@{ant-prefix}-input-search-enter-button) {
.@{ant-prefix}-input-suffix {
.@{form-prefix-cls}-rtl & {
Expand Down
23 changes: 13 additions & 10 deletions components/grid/style/index.less
Expand Up @@ -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;

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion components/image/style/index.less
Expand Up @@ -9,9 +9,9 @@
display: inline-block;

&-img {
display: block;
width: 100%;
height: auto;
vertical-align: middle;

&-placeholder {
background-color: @image-bg;
Expand Down

0 comments on commit 8d8daaa

Please sign in to comment.