Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/affix/style/entry.less
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@import './index.less';
@import "./patch";
@import './patch';
14 changes: 8 additions & 6 deletions components/alert/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@
overflow-wrap: break-word;
border-radius: @border-radius-base;

&-rtl {
direction: rtl;
}

&-content {
flex: 1;
min-width: 0;
}

&-icon {
margin-right: @margin-xs;
margin-inline-end: @margin-xs;
}

&-description {
Expand Down Expand Up @@ -67,11 +71,11 @@
}

&-action {
margin-left: @margin-xs;
margin-inline-start: @margin-xs;
}

&-close-icon {
margin-left: @margin-xs;
margin-inline-start: @margin-xs;
padding: 0;
overflow: hidden;
font-size: @font-size-sm;
Expand Down Expand Up @@ -110,7 +114,7 @@
}

&-with-description &-icon {
margin-right: @alert-with-description-padding-vertical;
margin-inline-end: @alert-with-description-padding-vertical;
font-size: @alert-with-description-icon-size;
}

Expand Down Expand Up @@ -151,5 +155,3 @@
border-radius: 0;
}
}

@import './rtl';
40 changes: 0 additions & 40 deletions components/alert/style/rtl.less

This file was deleted.

2 changes: 1 addition & 1 deletion components/anchor/style/entry.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@import './index.less';
@import '../../affix/style/entry.less';
@import "./patch";
@import './patch';
19 changes: 11 additions & 8 deletions components/anchor/style/index.less

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix wrong anchor link position in RTL

before:

Image

after:

Image

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

我这边预览的样式还是错误的

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那奇怪了,我本地再次验证了下样式没问题

Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
.reset-component();

position: relative;
padding-left: @anchor-border-width;
padding-inline-start: @anchor-border-width;

&-wrapper {
margin-left: -4px;
padding-left: 4px;
margin-inline-start: -4px;
padding-inline-start: 4px;
overflow: auto;
background-color: @anchor-bg;
}

&-ink {
position: absolute;
top: 0;
left: 0;
inset-inline-start: 0;
height: 100%;

&::before {
Expand All @@ -34,7 +34,7 @@

&-ball {
position: absolute;
left: 50%;
inset-inline-start: 50%;
display: none;
width: 8px;
height: 8px;
Expand All @@ -47,6 +47,10 @@
&.@{ant-prefix}-anchor-ink-ball-visible {
display: inline-block;
}

&:dir(rtl) {
transform: translateX(50%);
}
}
}

Expand All @@ -55,7 +59,8 @@
}

&-link {
padding: @anchor-link-padding;
padding-block: @anchor-link-padding-block;
padding-inline-start: @anchor-link-padding-inline-start;

&-title {
position: relative;
Expand All @@ -82,5 +87,3 @@
padding-bottom: 2px;
}
}

@import './rtl';
35 changes: 0 additions & 35 deletions components/anchor/style/rtl.less

This file was deleted.

2 changes: 1 addition & 1 deletion components/auto-complete/style/entry.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
// style dependencies
@import '../../select/style/entry.less';
@import '../../input/style/entry.less';
@import "./patch";
@import './patch';
10 changes: 8 additions & 2 deletions components/avatar/demo/badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,20 @@ import { NzBadgeModule } from 'ng-zorro-antd/badge';

@Component({
selector: 'nz-demo-avatar-badge',
imports: [NzBadgeModule, NzAvatarModule],
imports: [NzAvatarModule, NzBadgeModule],
template: `
<nz-badge [nzCount]="5" style="margin-right: 24px">
<nz-badge [nzCount]="5">
<nz-avatar nzIcon="user" nzShape="square" />
</nz-badge>
<nz-badge nzDot>
<nz-avatar nzIcon="user" nzShape="square" />
</nz-badge>
`,
styles: `
:host {
display: inline-flex;
gap: 24px;
}
`
})
export class NzDemoAvatarBadgeComponent {}
2 changes: 1 addition & 1 deletion components/avatar/demo/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { NzAvatarModule } from 'ng-zorro-antd/avatar';
styles: `
nz-avatar {
margin-top: 16px;
margin-right: 16px;
margin-inline-end: 16px;
}
`
})
Expand Down
24 changes: 7 additions & 17 deletions components/avatar/demo/dynamic.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,18 @@
import { Component, computed, signal } from '@angular/core';
import { FormsModule } from '@angular/forms';

import { NzAvatarModule } from 'ng-zorro-antd/avatar';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzInputNumberModule } from 'ng-zorro-antd/input-number';

const userList = ['Lucy', 'U', 'Tom', 'Edward'];
const colorList = ['#f56a00', '#7265e6', '#ffbf00', '#00a2ae'];

@Component({
selector: 'nz-demo-avatar-dynamic',
imports: [FormsModule, NzAvatarModule, NzButtonModule, NzInputNumberModule],
imports: [NzAvatarModule, NzButtonModule],
template: `
<div>
<label>Gap: </label>
<nz-input-number [nzMin]="0" [nzMax]="16" [nzStep]="1" [(ngModel)]="gap" />
<button nz-button (click)="change()">Change Text</button>
</div>

<nz-avatar [nzGap]="gap()" [nzText]="text()" nzSize="large" [style.background-color]="color()" />
`,
styles: `
div {
margin-bottom: 16px;
}
button {
margin-left: 8px;
}
<button nz-button (click)="change()" [style.margin-inline.px]="16">Change Text</button>
<button nz-button (click)="changeGap()">Change Gap</button>
`
})
export class NzDemoAvatarDynamicComponent {
Expand All @@ -38,4 +24,8 @@ export class NzDemoAvatarDynamicComponent {
change(): void {
this.index.update(idx => (idx + 1) % userList.length);
}

changeGap(): void {
this.gap.update(g => (g + 1) % 5);
}
}
2 changes: 1 addition & 1 deletion components/avatar/demo/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { NzAvatarModule } from 'ng-zorro-antd/avatar';
styles: `
nz-avatar {
margin-top: 16px;
margin-right: 16px;
margin-inline-end: 16px;
}
`
})
Expand Down
2 changes: 1 addition & 1 deletion components/avatar/doc/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ description: Used to represent users or things, supporting the display of images

```html
<nz-avatar-group>
<nz-avatar nzIcon="user"></nz-avatar>
<nz-avatar nzIcon="user" />
<!-- ... -->
</nz-avatar-group>
```
2 changes: 1 addition & 1 deletion components/avatar/doc/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ description: 用来代表用户或事物,支持图片、图标或字符展示

```html
<nz-avatar-group>
<nz-avatar nzIcon="user"></nz-avatar>
<nz-avatar nzIcon="user" />
<!-- ... -->
</nz-avatar-group>
```
4 changes: 2 additions & 2 deletions components/avatar/style/group.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
border: 1px solid @avatar-group-border-color;

&:not(:first-child) {
margin-left: @avatar-group-overlapping;
margin-inline-start: @avatar-group-overlapping;
}
}

&-popover {
.@{ant-prefix}-avatar + .@{ant-prefix}-avatar {
margin-left: @avatar-group-space;
margin-inline-start: @avatar-group-space;
}
}
}
1 change: 0 additions & 1 deletion components/avatar/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,3 @@
}

@import './group';
@import './rtl';
15 changes: 0 additions & 15 deletions components/avatar/style/rtl.less

This file was deleted.

2 changes: 1 addition & 1 deletion components/badge/demo/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { NzIconModule } from 'ng-zorro-antd/icon';
`,
styles: `
nz-badge {
margin-right: 20px;
margin-inline-end: 20px;
}

.head-example {
Expand Down
2 changes: 1 addition & 1 deletion components/badge/demo/dot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { NzIconModule } from 'ng-zorro-antd/icon';
`,
styles: `
nz-badge {
margin-right: 20px;
margin-inline-end: 20px;
}

nz-icon {
Expand Down
2 changes: 1 addition & 1 deletion components/badge/demo/overflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { NzBadgeModule } from 'ng-zorro-antd/badge';
`,
styles: `
nz-badge {
margin-right: 20px;
margin-inline-end: 20px;
}

.head-example {
Expand Down
2 changes: 1 addition & 1 deletion components/badge/demo/size.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { NzBadgeModule } from 'ng-zorro-antd/badge';
`,
styles: `
nz-badge {
margin-right: 20px;
margin-inline-end: 20px;
}

.head-example {
Expand Down
Loading