Skip to content

Commit

Permalink
chore: sync ant-design v4.4.2 (#5554)
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 authored Jul 14, 2020
1 parent fdf085b commit e083ca6
Show file tree
Hide file tree
Showing 116 changed files with 3,603 additions and 2,177 deletions.
31 changes: 18 additions & 13 deletions components/alert/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@
.reset-component;

position: relative;
max-height: 1000vh;
padding: 8px 15px 8px 37px;
word-wrap: break-word;
border-radius: @border-radius-base;

&&-no-icon {
padding: @alert-no-icon-padding-vertical 15px;
.@{alert-prefix-cls}-close-icon {
top: @alert-no-icon-padding-vertical + @font-size-base * @line-height-base / 2 -
@font-size-base / 2;
}
}

&&-closable {
Expand All @@ -21,14 +26,14 @@

&-icon {
position: absolute;
top: 8px + @font-size-base * @line-height-base / 2 - @font-size-base / 2;
top: @alert-icon-top;
left: 16px;
}

&-description {
display: none;
font-size: @font-size-base;
line-height: 22px;
line-height: @font-size-base + 8px;
}

&-success {
Expand Down Expand Up @@ -71,12 +76,12 @@

&-close-icon {
position: absolute;
top: @padding-xs;
right: 16px;
top: 8px + @font-size-base * @line-height-base / 2 - @font-size-base / 2;
right: @padding-md;
padding: 0;
overflow: hidden;
font-size: @font-size-sm;
line-height: 22px;
line-height: @font-size-sm;
background-color: transparent;
border: none;
outline: none;
Expand All @@ -101,7 +106,7 @@

&-with-description {
position: relative;
padding: 15px 15px 15px 64px;
padding: @alert-with-description-padding;
color: @alert-text-color;
line-height: @line-height-base;
border-radius: @border-radius-base;
Expand All @@ -113,15 +118,15 @@

&-with-description &-icon {
position: absolute;
top: 16px;
left: 24px;
font-size: 24px;
top: @alert-with-description-icon-top;
left: @alert-with-description-icon-size;
font-size: @alert-with-description-icon-size;
}

&-with-description &-close-icon {
position: absolute;
top: 16px;
right: 16px;
top: @padding-md;
right: @padding-md;
font-size: @font-size-base;
cursor: pointer;
}
Expand All @@ -142,7 +147,7 @@
}

&&-closing {
height: 0 !important;
max-height: 0;
margin: 0;
padding-top: 0;
padding-bottom: 0;
Expand Down Expand Up @@ -188,4 +193,4 @@
}
}

@import './rtl.less';
@import './rtl';
36 changes: 26 additions & 10 deletions components/alert/style/rtl.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,55 +4,71 @@
@alert-prefix-cls: ~'@{ant-prefix}-alert';

.@{alert-prefix-cls} {
&-rtl {
&&-rtl {
padding: 8px 37px 8px 15px;
direction: rtl;
}

&&-closable {
&&-no-icon {
.@{alert-prefix-cls}-rtl& {
padding: @alert-no-icon-padding-vertical 15px;
}
}

&&-closable {
.@{alert-prefix-cls}.@{alert-prefix-cls}-rtl& {
padding-right: 37px;
padding-left: 30px;
}
}

&&-no-icon&-closable {
.@{alert-prefix-cls}.@{alert-prefix-cls}-rtl& {
padding-right: 15px;
padding-left: 30px;
}
}

&-icon {
.@{alert-prefix-cls}-rtl & {
right: 16px;
right: @padding-md;
left: auto;
}
}

&-close-icon {
.@{alert-prefix-cls}-rtl & {
right: auto;
left: 16px;
left: @padding-md;
}
}

&-with-description {
.@{alert-prefix-cls}-rtl& {
padding: 15px 64px 15px 15px;
&-with-description,
&-with-description&-closable {
.@{alert-prefix-cls}.@{alert-prefix-cls}-rtl& {
padding: @alert-with-description-padding-vertical @alert-with-description-icon-size * 2 +
@alert-with-description-padding-vertical @alert-with-description-no-icon-padding-vertical
15px;
}
}

&-with-description&-no-icon {
.@{alert-prefix-cls}-rtl& {
.@{alert-prefix-cls}.@{alert-prefix-cls}-rtl& {
padding: 15px;
}
}

&-with-description &-icon {
.@{alert-prefix-cls}-rtl& {
right: 24px;
right: @alert-with-description-icon-size;
left: auto;
}
}

&-with-description &-close-icon {
.@{alert-prefix-cls}-rtl& {
right: auto;
left: 16px;
left: @padding-md;
}
}
}
2 changes: 1 addition & 1 deletion components/anchor/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
}

&-link {
padding: 7px 0 7px 16px;
padding: @anchor-link-padding;
line-height: 1.143;

&-title {
Expand Down
2 changes: 1 addition & 1 deletion components/anchor/style/rtl.less
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

&-link {
.@{ant-prefix}-anchor-rtl & {
padding: 7px 16px 7px 0;
padding: @anchor-link-top @anchor-link-left @anchor-link-top 0;
}
}
}
11 changes: 6 additions & 5 deletions components/back-top/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
height: 40px;
cursor: pointer;

&:empty {
display: none;
}

&-rtl {
right: auto;
left: 100px;
Expand All @@ -37,11 +41,8 @@
}

&-icon {
width: 14px;
height: 16px;
margin: 12px auto;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAoCAYAAACWwljjAAAABGdBTUEAALGPC/xhBQAAAbtJREFUWAntmMtKw0AUhhMvS5cuxILgQlRUpIggIoKIIoigG1eC+AA+jo+i6FIXBfeuXIgoeKVeitVWJX5HWhhDksnUpp3FDPyZk3Nm5nycmZKkXhAEOXSA3lG7muTeRzmfy6HneUvIhnYkQK+Q9NhAA0Opg0vBEhjBKHiyb8iGMyQMOYuK41BcBSypAL+MYXSKjtFAW7EAGEO3qN4uMQbbAkXiSfRQJ1H6a+yhlkKRcAoVFYiweYNjtCVQJJpBz2GCiPt7fBOZQpFgDpUikse5HgnkM4Fi4QX0Fpc5wf9EbLqpUCy4jMoJSXWhFwbMNgWKhVbRhy5jirhs9fy/oFhgHVVTJEs7RLZ8sSEoJm6iz7SZDMbJ+/OKERQTttCXQRLToRUmrKWCYuA2+jbN0MB4OQobYShfdTCgn/sL1K36M7TLrN3n+758aPy2rrpR6+/od5E8tf/A1uLS9aId5T7J3CNYihkQ4D9PiMdMC7mp4rjB9kjFjZp8BlnVHJBuO1yFXIV0FdDF3RlyFdJVQBdv5AxVdIsq8apiZ2PyYO1EVykesGfZEESsCkweyR8MUW+V8uJ1gkYipmpdP1pm2aJVPEGzAAAAAElFTkSuQmCC)
~'100%/100%' no-repeat;
font-size: 24px;
line-height: 40px;
}
}

Expand Down
3 changes: 2 additions & 1 deletion components/breadcrumb/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
}

&-link {
> .@{iconfont-css-prefix} + span {
> .@{iconfont-css-prefix} + span,
> .@{iconfont-css-prefix} + a {
margin-left: 4px;
}
}
Expand Down
3 changes: 2 additions & 1 deletion components/breadcrumb/style/rtl.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
}

&-link {
> .@{iconfont-css-prefix} + span {
> .@{iconfont-css-prefix} + span,
> .@{iconfont-css-prefix} + a {
.@{breadcrumb-prefix-cls}-rtl & {
margin-right: 4px;
margin-left: 0;
Expand Down
32 changes: 18 additions & 14 deletions components/button/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@
line-height: @line-height-base;
.btn;
.btn-default;
// Make sure that the target of Button's click event always be `button`
// Ref: https://github.com/ant-design/ant-design/issues/7034
> i,

// Fix loading button animation
// https://github.com/ant-design/ant-design/issues/24323
> span {
display: inline-block;
pointer-events: none;
}

&-primary {
Expand Down Expand Up @@ -80,6 +79,10 @@
.btn-link;
}

&-text {
.btn-text;
}

&-dangerous {
.btn-danger-default;
}
Expand All @@ -92,12 +95,13 @@
.btn-danger-link;
}

&-dangerous&-text {
.btn-danger-text;
}

&-icon-only {
.btn-square(@btn-prefix-cls);

> i {
vertical-align: middle;
}
vertical-align: -0.5px;
}

&-round {
Expand Down Expand Up @@ -158,6 +162,12 @@
.@{iconfont-css-prefix} {
padding-right: @margin-xs;
}

&:only-child {
.@{iconfont-css-prefix} {
padding-right: 0;
}
}
}

&-group {
Expand Down Expand Up @@ -198,12 +208,6 @@
.button-variant-ghost(@btn-danger-border, transparent);
}

&-background-ghost&-link {
.button-variant-ghost(@link-color; transparent);

color: @btn-link-ghost-color;
}

&-two-chinese-chars::first-letter {
letter-spacing: 0.34em;
}
Expand Down
Loading

0 comments on commit e083ca6

Please sign in to comment.