Skip to content

Commit da19aac

Browse files
committed
feat: add unit type
1 parent 96ed4db commit da19aac

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

src/types/index.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export * from './property'
2+
export * from './unit'
3+
export * from './at-rule'
4+
export * from './media'
5+
export * from './selector'
6+
export * from './functions'

src/types/unit.d.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
export type RelativeUnit = 'em' | 'rem' | 'vw' | 'vh' | 'vmin' | 'vmax' | 'ex' | 'cap' | 'ch' | 'ic' | 'lh' | 'rlh' | 'vi' | 'vb'
2+
3+
export type AbsoluteUnit = 'px' | 'pt' | 'cm' | 'mm' | 'Q' | 'in' | 'pc'
4+
5+
export type AngleUnit = 'deg' | 'grad' | 'rad' | 'turn'
6+
7+
export type PercentUnit = '%'
8+
9+
export type TimeUnit = 'ms' | 's'
10+
11+
export type FrequencyUnit = 'Hz' | 'kHz'
12+
13+
export type ResolutionUnit = 'dpi' | 'dpcm' | 'dppx'
14+
15+
export type CustomUnit = 'rpx'
16+
17+
export type Unit = RelativeUnit | AbsoluteUnit | AngleUnit | PercentUnit | TimeUnit | FrequencyUnit | ResolutionUnit | CustomUnit

0 commit comments

Comments
 (0)