Skip to content

Commit 3cab06e

Browse files
refactor(module:pipe): deprecated css-unit pipe (#8027)
1 parent d57b7da commit 3cab06e

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

components/pipes/demo/css-unit.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@ title:
99

1010
Css 单位
1111

12+
警告:在 `v17.0.0` 中被弃用,请使用 Angular 内置语法替代,例如:
13+
14+
```html
15+
<div [style.border-radius.px]="1">px</div>
16+
<div [style.border-radius.%]="1">%</div>
17+
<div [style.border-radius.rem]="1">rem</div>
18+
```
19+
1220
## en-US
1321

14-
Css unit
22+
Css unit
23+
24+
WARNING: Deprecated in `v17.0.0`, please use angular's built-in syntax instead, eg:
25+
26+
```html
27+
<div [style.border-radius.px]="1">px</div>
28+
<div [style.border-radius.%]="1">%</div>
29+
<div [style.border-radius.rem]="1">rem</div>
30+
```

components/pipes/nz-css-unit.pipe.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55

66
import { Pipe, PipeTransform } from '@angular/core';
77

8+
/**
9+
* @deprecated v17.0.0 - Use angular's built-in syntax instead
10+
*/
811
@Pipe({
912
name: 'nzToCssUnit'
1013
})

0 commit comments

Comments
 (0)