Skip to content

Commit

Permalink
feat: add styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Wendell committed Aug 6, 2019
1 parent 459793e commit aac803a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 11 deletions.
30 changes: 20 additions & 10 deletions components/descriptions/nz-descriptions.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,26 @@
<table>
<tbody>
<ng-container *ngIf="nzLayout === 'horizontal'">
<tr class="ant-descriptions-row" *ngFor="let row of itemMatrix; let i = index">
<tr class="ant-descriptions-row"
*ngFor="let row of itemMatrix; let i = index">
<ng-container *ngFor="let item of row; let isLast = last">
<!-- Horizontal & NOT Bordered -->
<ng-container *ngIf="!nzBordered">
<td class="ant-descriptions-item" [class.ant-descriptions-item-colon]="nzColon" [colSpan]="item.span">
<span class="ant-descriptions-item-label">{{ item.title }}</span>
<td class="ant-descriptions-item"
[colSpan]="item.span">
<span class="ant-descriptions-item-label"
[class.ant-descriptions-item-colon]="nzColon">{{ item.title }}</span>
<span class="ant-descriptions-item-content">
<ng-template [ngTemplateOutlet]="item.content"></ng-template>
</span>
</td>
</ng-container>
<!-- Horizontal & Bordered -->
<ng-container *ngIf="nzBordered">
<td class="ant-descriptions-item-label" *nzStringTemplateOutlet="item.title">{{ item.title }}</td>
<td class="ant-descriptions-item-content" [colSpan]="isLast ? item.span * 2 - 1 : item.span">
<td class="ant-descriptions-item-label"
*nzStringTemplateOutlet="item.title">{{ item.title }}</td>
<td class="ant-descriptions-item-content"
[colSpan]="isLast ? item.span * 2 - 1 : item.span">
<ng-template [ngTemplateOutlet]="item.content"></ng-template>
</td>
</ng-container>
Expand All @@ -34,14 +39,17 @@
<ng-container *ngFor="let row of itemMatrix; let i = index">
<tr class="ant-descriptions-row">
<ng-container *ngFor="let item of row; let isLast = last">
<td class="ant-descriptions-item" [class.ant-descriptions-item-colon]="nzColon" [colSpan]="item.span">
<span class="ant-descriptions-item-label">{{ item.title }}</span>
<td class="ant-descriptions-item"
[colSpan]="item.span">
<span class="ant-descriptions-item-label"
[class.ant-descriptions-item-colon]="nzColon">{{ item.title }}</span>
</td>
</ng-container>
</tr>
<tr class="ant-descriptions-row">
<ng-container *ngFor="let item of row; let isLast = last">
<td class="ant-descriptions-item" [colSpan]="item.span">
<td class="ant-descriptions-item"
[colSpan]="item.span">
<span class="ant-descriptions-item-content">
<ng-template [ngTemplateOutlet]="item.content"></ng-template>
</span>
Expand All @@ -55,14 +63,16 @@
<ng-container *ngFor="let row of itemMatrix; let i = index">
<tr class="ant-descriptions-row">
<ng-container *ngFor="let item of row; let isLast = last">
<td class="ant-descriptions-item-label" [colSpan]="item.span">
<td class="ant-descriptions-item-label"
[colSpan]="item.span">
{{ item.title }}
</td>
</ng-container>
</tr>
<tr class="ant-descriptions-row">
<ng-container *ngFor="let item of row; let isLast = last">
<td class="ant-descriptions-item-content" [colSpan]="item.span">
<td class="ant-descriptions-item-content"
[colSpan]="item.span">
<ng-template [ngTemplateOutlet]="item.content"></ng-template>
</td>
</ng-container>
Expand Down
6 changes: 6 additions & 0 deletions components/descriptions/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@
position: relative;
top: -0.5px;
margin: 0 8px 0 2px;
content: ' ';
}
}

&-item-colon {
&::after {
content: ':';
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/progress/nz-progress.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
class="ant-progress-inner"
*ngIf="isCircleStyle"
>
<svg class="ant-progress-circle " viewBox="0 0 100 100">
<svg class="ant-progress-circle" viewBox="0 0 100 100">
<path
class="ant-progress-circle-trail"
stroke="#f3f3f3"
Expand Down

0 comments on commit aac803a

Please sign in to comment.