Skip to content
This repository was archived by the owner on Aug 25, 2020. It is now read-only.

Commit a25165f

Browse files
committed
feat: add autoPx for: border-*-radius
1 parent 436a37d commit a25165f

4 files changed

Lines changed: 34 additions & 33 deletions

File tree

package/src/compiler/compiler.service.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { DOCUMENT } from '@angular/common';
22
import { Inject, Injectable } from '@angular/core';
33
import { ɵSharedStylesHost as SharedStylesHost } from '@angular/platform-browser';
4-
import { processAutoPx } from './process-auto-px';
5-
import { autoPx } from '../meta/compiler';
4+
import { autoPx, processAutoPx } from './process-auto-px';
65
import { StyleDef } from '../meta/def';
76
import { Style } from '../meta/style';
87
import { isString } from '../utils/is-string';

package/src/compiler/process-auto-px.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
11
import { isString } from '../utils/is-string';
22

3+
export const autoPx = [
4+
'border-radius',
5+
'border-top-left-radius',
6+
'border-top-right-radius',
7+
'border-bottom-right-radius',
8+
'border-bottom-left-radius',
9+
'border-width',
10+
'border-top-width',
11+
'border-right-width',
12+
'border-bottom-width',
13+
'border-left-width',
14+
'bottom',
15+
'height',
16+
'left',
17+
'line-height',
18+
'margin',
19+
'margin-bottom',
20+
'margin-left',
21+
'margin-right',
22+
'margin-top',
23+
'max-height',
24+
'max-width',
25+
'min-height',
26+
'min-width',
27+
'padding',
28+
'padding-bottom',
29+
'padding-left',
30+
'padding-right',
31+
'padding-top',
32+
'right',
33+
'top',
34+
'width',
35+
];
336
export function processAutoPx(rawValue: string | number) {
437
return isString(rawValue)
538
? rawValue

package/src/meta/compiler.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.

package/src/meta/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export * from './color';
2-
export * from './compiler';
32
export * from './component';
43
export * from './css';
54
export * from './def';

0 commit comments

Comments
 (0)