-
Notifications
You must be signed in to change notification settings - Fork 0
/
css-property-values.d.ts
202 lines (199 loc) · 4.79 KB
/
css-property-values.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
/* eslint-disable @typescript-eslint/ban-types */
import type { NamedColor } from './colors';
// Create script to collect all the values, wherever posible.
// Scrap https://dofactory.com/css/properties#list or other site, and get all single word options
export type PickPropertyValues<T> = T extends 'color'
? ColorOptions
: T extends 'alignContent'
? AlignContentOptions
: T extends 'alignItems'
? AlignItemsOptions
: T extends 'alignSelf'
? AlignSelfOptions
: T extends 'all'
? AllOptions
: T extends 'accentColor'
? ColorOptions
: T extends 'animationDirection'
? AnimationDirectionOptions
: T extends 'animationFillMode'
? AnimationFillModeOptions
: T extends 'animationPlayState'
? AnimationPlayStateOptions
: T extends 'animationPlayState'
? AnimationPlayStateOptions
: T extends 'borderStyle'
? BorderStyleOptions
: T extends 'background'
? ColorOptions
: T extends 'backgroundColor'
? ColorOptions
: T extends 'backgroundImage'
? BackgroundImageOptions
: T extends 'backgroundRepeat'
? BackgroundRepeatOptions
: T extends 'backgroundAttachment'
? BackgroundAttachmentOptions
: T extends 'backgroundPosition'
? BackgroundPositionOptions
: T extends 'position'
? PPositionOptions
: T extends 'transform'
? TransformOptions
: T extends 'fontStyle'
? FontStyleOptions
: T extends 'fontWeight'
? FontWeightOptions
: T extends 'flexDirection'
? FlexDirectionOptions
: T extends 'zIndex'
? string
: T extends 'top'
? string
: T extends 'display'
? DisplayOptions
: T extends 'bottom'
? string
: T extends 'left'
? string
: T extends 'right'
? string
: string & {};
export type CommonOptions = 'initial' | 'inherit' | (string & {});
export type ColorOptions = NamedColor | (string & {});
export type AlignContentOptions =
| 'flex-wrap'
| 'stretch'
| 'center'
| 'flex-start'
| 'flex-end'
| 'space-between'
| 'space-around'
| CommonOptions;
export type AlignItemsOptions = 'stretch' | 'center' | 'flex-start' | 'flex-end' | 'baseline' | CommonOptions;
export type DisplayOptions =
| 'inline'
| 'block'
| 'contents'
| 'flex'
| 'grid'
| 'inline-block'
| 'inline-flex'
| 'inline-grid'
| 'inline-table'
| 'list-item'
| 'run-in'
| 'table'
| 'table-caption'
| 'table-column-group'
| 'table-header-group'
| 'table-footer-group'
| 'table-row-group'
| 'table-cell'
| 'table-column'
| 'table-row'
| 'none'
| CommonOptions;
type AlignSelfOptions = 'auto' | 'stretch' | 'center' | 'flex-start' | 'flex-end' | 'baseline' | CommonOptions;
type AllOptions = CommonOptions | 'unset';
type AnimationDirectionOptions =
| 'normal'
| 'reverse'
| 'alternate'
| 'alternate-reverse'
| 'initial'
| 'inherit'
| (string & {});
type AnimationFillModeOptions = 'none' | 'forwards' | 'backwards' | 'both' | CommonOptions;
type AnimationPlayStateOptions = 'paused' | 'running' | CommonOptions;
type BorderStyleOptions =
| 'none'
| 'no'
| 'none'
| 'hidden'
| 'dotted'
| 'dashed'
| 'solid'
| 'double'
| 'groove'
| 'ridge'
| 'inset'
| 'outset'
| CommonOptions;
export type BackgroundImageOptions =
| 'url()'
| 'none'
| 'conic-gradient()'
| 'linear-gradient()'
| 'radial-gradient()'
| 'repeating-conic-gradient()'
| 'repeating-linear-gradient()'
| 'repeating-radial-gradient()'
| 'initial'
| 'inherit';
type BackgroundRepeatOptions =
| 'repeat'
| 'no'
| 'repeat'
| 'repeat-x'
| 'repeat-y'
| 'no-repeat'
| 'space'
| 'round'
| CommonOptions;
type BackgroundAttachmentOptions = 'scroll' | 'no' | 'scroll' | 'fixed' | 'local' | CommonOptions;
type BackgroundPositionOptions =
| 'left top'
| 'left center'
| 'left bottom'
| 'right top'
| 'right center'
| 'right bottom'
| 'center top'
| 'center center'
| 'center bottom'
| 'inherit'
| 'initial'
| (string & {});
export type PPositionOptions = 'static' | 'fixed' | 'absolute' | 'relative' | 'sticky' | CommonOptions;
export type TransformOptions =
| 'none'
| 'matrix(n,n,n,n,n,n)'
| 'matrix3d(n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n)'
| 'translate(x,y)'
| 'translate3d(x,y,z)'
| 'translateX(x)'
| 'translateY(y)'
| 'translateZ(z)'
| 'scale(x,y)'
| 'scale3d(x,y,z)'
| 'scaleX(x)'
| 'scaleY(y)'
| 'scaleZ(z)'
| 'rotate(angle)'
| 'rotate3d(x,y,z,angle)'
| 'rotateX(angle)'
| 'rotateY(angle)'
| 'rotateZ(angle)'
| 'skew(x-angle,y-angle)'
| 'skewX(angle)'
| 'skewY(angle)'
| 'perspective(n)'
| CommonOptions;
export type FontWeightOptions =
| 'normal'
| 'bold'
| 'bolder'
| 'lighter'
| '100'
| '200'
| '300'
| '400'
| '500'
| '600'
| '700'
| '800'
| '900'
| CommonOptions;
export type FontStyleOptions = 'normal' | 'italic' | 'oblique' | CommonOptions;
export type FlexDirectionOptions = 'row' | 'column' | 'row-reverse' | 'column-reverse' | CommonOptions;