-
Notifications
You must be signed in to change notification settings - Fork 72
/
css-flexbox.json
492 lines (492 loc) · 23.9 KB
/
css-flexbox.json
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
{
"spec": {
"title": "CSS Flexible Box Layout Module Level 1",
"url": "https://drafts.csswg.org/css-flexbox-1/"
},
"properties": [
{
"name": "flex-direction",
"href": "https://drafts.csswg.org/css-flexbox-1/#propdef-flex-direction",
"value": "row | row-reverse | column | column-reverse",
"initial": "row",
"appliesTo": "flex containers",
"inherited": "no",
"percentages": "n/a",
"computedValue": "specified keyword",
"canonicalOrder": "per grammar",
"animationType": "discrete",
"values": [
{
"name": "row",
"prose": "The flex container’s main axis has the same orientation as the inline axis of the current writing mode. The main-start and main-end directions are equivalent to the inline-start and inline-end directions, respectively, of the current writing mode.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-flex-direction-row",
"type": "value",
"value": "row"
},
{
"name": "row-reverse",
"prose": "Same as row, except the main-start and main-end directions are swapped.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-flex-direction-row-reverse",
"type": "value",
"value": "row-reverse"
},
{
"name": "column",
"prose": "The flex container’s main axis has the same orientation as the block axis of the current writing mode. The main-start and main-end directions are equivalent to the block-start and block-end directions, respectively, of the current writing mode.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-flex-direction-column",
"type": "value",
"value": "column"
},
{
"name": "column-reverse",
"prose": "Same as column, except the main-start and main-end directions are swapped.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-flex-direction-column-reverse",
"type": "value",
"value": "column-reverse"
}
],
"styleDeclaration": [
"flex-direction",
"flexDirection"
]
},
{
"name": "flex-wrap",
"href": "https://drafts.csswg.org/css-flexbox-1/#propdef-flex-wrap",
"value": "nowrap | wrap | wrap-reverse",
"initial": "nowrap",
"appliesTo": "flex containers",
"inherited": "no",
"percentages": "n/a",
"computedValue": "specified keyword",
"canonicalOrder": "per grammar",
"animationType": "discrete",
"values": [
{
"name": "nowrap",
"prose": "The flex container is single-line.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-flex-wrap-nowrap",
"type": "value",
"value": "nowrap"
},
{
"name": "wrap",
"prose": "The flex container is multi-line.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-flex-wrap-wrap",
"type": "value",
"value": "wrap"
},
{
"name": "wrap-reverse",
"prose": "Same as wrap.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-flex-wrap-wrap-reverse",
"type": "value",
"value": "wrap-reverse"
}
],
"styleDeclaration": [
"flex-wrap",
"flexWrap"
]
},
{
"name": "flex-flow",
"href": "https://drafts.csswg.org/css-flexbox-1/#propdef-flex-flow",
"value": "<'flex-direction'> || <'flex-wrap'>",
"initial": "see individual properties",
"appliesTo": "see individual properties",
"inherited": "see individual properties",
"percentages": "see individual properties",
"computedValue": "see individual properties",
"animationType": "see individual properties",
"canonicalOrder": "per grammar",
"styleDeclaration": [
"flex-flow",
"flexFlow"
]
},
{
"name": "flex",
"href": "https://drafts.csswg.org/css-flexbox-1/#propdef-flex",
"value": "none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]",
"initial": "0 1 auto",
"appliesTo": "flex items",
"inherited": "no",
"percentages": "see individual properties",
"computedValue": "see individual properties",
"animationType": "by computed value type",
"canonicalOrder": "per grammar",
"values": [
{
"name": "<'flex-grow'>",
"prose": "This <number [0,∞]> component sets flex-grow longhand and specifies the flex grow factor, which determines how much the flex item will grow relative to the rest of the flex items in the flex container when positive free space is distributed. When omitted, it is set to 1.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-flex-flex-grow",
"type": "value",
"value": "<'flex-grow'>"
},
{
"name": "<'flex-shrink'>",
"prose": "This <number [0,∞]> component sets flex-shrink longhand and specifies the flex shrink factor, which determines how much the flex item will shrink relative to the rest of the flex items in the flex container when negative free space is distributed. When omitted, it is set to 1.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-flex-flex-shrink",
"type": "value",
"value": "<'flex-shrink'>"
},
{
"name": "<'flex-basis'>",
"prose": "This component sets the flex-basis longhand, which specifies the flex basis: the initial main size of the flex item, before free space is distributed according to the flex factors. <'flex-basis'> accepts the same values as the width and height properties (except that auto is treated differently) plus the content keyword: When omitted from the flex shorthand, its specified value is 0.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-flex-flex-basis",
"type": "value",
"value": "<'flex-basis'>"
},
{
"name": "none",
"prose": "The keyword none expands to 0 0 auto.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-flex-none",
"type": "value",
"value": "none"
}
],
"styleDeclaration": [
"flex"
]
},
{
"name": "flex-grow",
"href": "https://drafts.csswg.org/css-flexbox-1/#propdef-flex-grow",
"value": "<number [0,∞]>",
"initial": "0",
"appliesTo": "flex items",
"inherited": "no",
"percentages": "n/a",
"computedValue": "specified number",
"canonicalOrder": "per grammar",
"animationType": "by computed value type",
"values": [
{
"name": "<number>",
"prose": "The flex-grow property sets the flex grow factor to the provided <number>. Negative values are not allowed.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-flex-grow-number",
"type": "value",
"value": "<number>"
}
],
"styleDeclaration": [
"flex-grow",
"flexGrow"
]
},
{
"name": "flex-shrink",
"href": "https://drafts.csswg.org/css-flexbox-1/#propdef-flex-shrink",
"value": "<number [0,∞]>",
"initial": "1",
"appliesTo": "flex items",
"inherited": "no",
"percentages": "n/a",
"computedValue": "specified value",
"canonicalOrder": "per grammar",
"animationType": "number",
"values": [
{
"name": "<number>",
"prose": "The flex-shrink property sets the flex shrink factor to the provided <number>. Negative values are not allowed.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-flex-shrink-number",
"type": "value",
"value": "<number>"
}
],
"styleDeclaration": [
"flex-shrink",
"flexShrink"
]
},
{
"name": "flex-basis",
"href": "https://drafts.csswg.org/css-flexbox-1/#propdef-flex-basis",
"value": "content | <'width'>",
"initial": "auto",
"appliesTo": "flex items",
"inherited": "no",
"percentages": "relative to the flex container’s inner main size",
"computedValue": "specified keyword or a computed <length-percentage> value",
"canonicalOrder": "per grammar",
"animationType": "by computed value type",
"values": [
{
"name": "auto",
"prose": "When specified on a flex item, the auto keyword retrieves the value of the main size property as the used flex-basis. If that value is itself auto, then the used value is content.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-flex-basis-auto",
"type": "value",
"value": "auto"
},
{
"name": "content",
"prose": "Indicates an automatic size based on the flex item’s content. (This is typically equivalent to the max-content size, but with adjustments to handle preferred aspect ratios, intrinsic sizing constraints, and orthogonal flows; see details in § 9 Flex Layout Algorithm.)",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-flex-basis-content",
"type": "value",
"value": "content"
}
],
"styleDeclaration": [
"flex-basis",
"flexBasis"
]
},
{
"name": "justify-content",
"href": "https://drafts.csswg.org/css-flexbox-1/#propdef-justify-content",
"value": "flex-start | flex-end | center | space-between | space-around",
"initial": "flex-start",
"appliesTo": "flex containers",
"inherited": "no",
"percentages": "n/a",
"computedValue": "specified keyword",
"canonicalOrder": "per grammar",
"animationType": "discrete",
"values": [
{
"name": "flex-start",
"prose": "Flex items are packed toward the start of the line. The main-start margin edge of the first flex item on the line is placed flush with the main-start edge of the line, and each subsequent flex item is placed flush with the preceding item.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-justify-content-flex-start",
"type": "value",
"value": "flex-start"
},
{
"name": "flex-end",
"prose": "Flex items are packed toward the end of the line. The main-end margin edge of the last flex item is placed flush with the main-end edge of the line, and each preceding flex item is placed flush with the subsequent item.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-justify-content-flex-end",
"type": "value",
"value": "flex-end"
},
{
"name": "center",
"prose": "Flex items are packed toward the center of the line. The flex items on the line are placed flush with each other and aligned in the center of the line, with equal amounts of space between the main-start edge of the line and the first item on the line and between the main-end edge of the line and the last item on the line. (If the leftover free-space is negative, the flex items will overflow equally in both directions.)",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-justify-content-center",
"type": "value",
"value": "center"
},
{
"name": "space-between",
"prose": "Flex items are evenly distributed in the line. If the leftover free-space is negative or there is only a single flex item on the line, this value falls back to safe flex-start. Otherwise, the main-start margin edge of the first flex item on the line is placed flush with the main-start edge of the line, the main-end margin edge of the last flex item on the line is placed flush with the main-end edge of the line, and the remaining flex items on the line are distributed so that the spacing between any two adjacent items is the same.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-justify-content-space-between",
"type": "value",
"value": "space-between"
},
{
"name": "space-around",
"prose": "Flex items are evenly distributed in the line, with half-size spaces on either end. If the leftover free-space is negative or there is only a single flex item on the line, this value falls back to safe center. Otherwise, the flex items on the line are distributed such that the spacing between any two adjacent flex items on the line is the same, and the spacing between the first/last flex items and the flex container edges is half the size of the spacing between flex items.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-justify-content-space-around",
"type": "value",
"value": "space-around"
}
],
"styleDeclaration": [
"justify-content",
"justifyContent"
]
},
{
"name": "align-items",
"href": "https://drafts.csswg.org/css-flexbox-1/#propdef-align-items",
"value": "flex-start | flex-end | center | baseline | stretch",
"initial": "stretch",
"appliesTo": "flex containers",
"inherited": "no",
"percentages": "n/a",
"computedValue": "specified keyword",
"canonicalOrder": "per grammar",
"animationType": "discrete",
"values": [
{
"name": "auto",
"prose": "Defers cross-axis alignment control to the value of align-items on the parent box. (This is the initial value of align-self.)",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-align-items-auto",
"type": "value",
"value": "auto"
},
{
"name": "flex-start",
"prose": "The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-align-items-flex-start",
"type": "value",
"value": "flex-start"
},
{
"name": "flex-end",
"prose": "The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-align-items-flex-end",
"type": "value",
"value": "flex-end"
},
{
"name": "center",
"prose": "The flex item’s margin box is centered in the cross axis within the line. (If the cross size of the flex line is less than that of the flex item, it will overflow equally in both directions.)",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-align-items-center",
"type": "value",
"value": "center"
},
{
"name": "baseline",
"prose": "The flex item participates in baseline alignment: all participating flex items on the line are aligned such that their baselines align, and the item with the largest distance between its baseline and its cross-start margin edge is placed flush against the cross-start edge of the line. If the item does not have a baseline in the necessary axis, then one is synthesized from the flex item’s border box.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-align-items-baseline",
"type": "value",
"value": "baseline"
},
{
"name": "stretch",
"prose": "If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched. Its used value is the length necessary to make the cross size of the item’s margin box as close to the same size as the line as possible, while still respecting the constraints imposed by min-height/min-width/max-height/max-width. The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-align-items-stretch",
"type": "value",
"value": "stretch"
}
],
"styleDeclaration": [
"align-items",
"alignItems"
]
},
{
"name": "align-self",
"href": "https://drafts.csswg.org/css-flexbox-1/#propdef-align-self",
"value": "auto | flex-start | flex-end | center | baseline | stretch",
"initial": "auto",
"appliesTo": "flex items",
"inherited": "no",
"percentages": "n/a",
"computedValue": "specified keyword",
"canonicalOrder": "per grammar",
"animationType": "discrete",
"values": [
{
"name": "auto",
"prose": "Defers cross-axis alignment control to the value of align-items on the parent box. (This is the initial value of align-self.)",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-align-items-auto",
"type": "value",
"value": "auto"
},
{
"name": "flex-start",
"prose": "The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-align-items-flex-start",
"type": "value",
"value": "flex-start"
},
{
"name": "flex-end",
"prose": "The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-align-items-flex-end",
"type": "value",
"value": "flex-end"
},
{
"name": "center",
"prose": "The flex item’s margin box is centered in the cross axis within the line. (If the cross size of the flex line is less than that of the flex item, it will overflow equally in both directions.)",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-align-items-center",
"type": "value",
"value": "center"
},
{
"name": "baseline",
"prose": "The flex item participates in baseline alignment: all participating flex items on the line are aligned such that their baselines align, and the item with the largest distance between its baseline and its cross-start margin edge is placed flush against the cross-start edge of the line. If the item does not have a baseline in the necessary axis, then one is synthesized from the flex item’s border box.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-align-items-baseline",
"type": "value",
"value": "baseline"
},
{
"name": "stretch",
"prose": "If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched. Its used value is the length necessary to make the cross size of the item’s margin box as close to the same size as the line as possible, while still respecting the constraints imposed by min-height/min-width/max-height/max-width. The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-align-items-stretch",
"type": "value",
"value": "stretch"
}
],
"styleDeclaration": [
"align-self",
"alignSelf"
]
},
{
"name": "align-content",
"href": "https://drafts.csswg.org/css-flexbox-1/#propdef-align-content",
"value": "flex-start | flex-end | center | space-between | space-around | stretch",
"initial": "stretch",
"appliesTo": "multi-line flex containers",
"inherited": "no",
"percentages": "n/a",
"computedValue": "specified keyword",
"canonicalOrder": "per grammar",
"animationType": "discrete",
"values": [
{
"name": "flex-start",
"prose": "Lines are packed toward the start of the flex container. The cross-start edge of the first line in the flex container is placed flush with the cross-start edge of the flex container, and each subsequent line is placed flush with the preceding line.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-align-content-flex-start",
"type": "value",
"value": "flex-start"
},
{
"name": "flex-end",
"prose": "Lines are packed toward the end of the flex container. The cross-end edge of the last line is placed flush with the cross-end edge of the flex container, and each preceding line is placed flush with the subsequent line.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-align-content-flex-end",
"type": "value",
"value": "flex-end"
},
{
"name": "center",
"prose": "Lines are packed toward the center of the flex container. The lines in the flex container are placed flush with each other and aligned in the center of the flex container, with equal amounts of space between the cross-start content edge of the flex container and the first line in the flex container, and between the cross-end content edge of the flex container and the last line in the flex container. (If the leftover free-space is negative, the lines will overflow equally in both directions.)",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-align-content-center",
"type": "value",
"value": "center"
},
{
"name": "space-between",
"prose": "Lines are evenly distributed in the flex container. If the leftover free-space is negative or there is only a single flex line in the flex container, this value falls back to safe flex-start. Otherwise, the cross-start edge of the first line in the flex container is placed flush with the cross-start content edge of the flex container, the cross-end edge of the last line in the flex container is placed flush with the cross-end content edge of the flex container, and the remaining lines in the flex container are distributed so that the spacing between any two adjacent lines is the same.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-align-content-space-between",
"type": "value",
"value": "space-between"
},
{
"name": "space-around",
"prose": "Lines are evenly distributed in the flex container, with half-size spaces on either end. If the leftover free-space is negative this value falls back to safe center. Otherwise, the lines in the flex container are distributed such that the spacing between any two adjacent lines is the same, and the spacing between the first/last lines and the flex container edges is half the size of the spacing between flex lines.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-align-content-space-around",
"type": "value",
"value": "space-around"
},
{
"name": "stretch",
"prose": "Lines stretch to take up the remaining space. If the leftover free-space is negative, this value falls back to safe flex-start. Otherwise, the free-space is split equally between all of the lines, increasing their cross size.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-align-content-stretch",
"type": "value",
"value": "stretch"
}
],
"styleDeclaration": [
"align-content",
"alignContent"
]
}
],
"atrules": [],
"selectors": [],
"values": [],
"warnings": [
{
"msg": "Dangling value",
"name": "flex",
"prose": "This value causes an element to generate a flex container box that is block-level when placed in flow layout.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-display-flex",
"type": "value",
"value": "flex",
"for": "display"
},
{
"msg": "Dangling value",
"name": "inline-flex",
"prose": "This value causes an element to generate a flex container box that is inline-level when placed in flow layout.",
"href": "https://drafts.csswg.org/css-flexbox-1/#valdef-display-inline-flex",
"type": "value",
"value": "inline-flex",
"for": "display"
}
]
}