You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css3-flexbox/Overview.src.html
+32-8Lines changed: 32 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -298,7 +298,7 @@ <h3 id='flex-flow'>
298
298
<dd>Same as <i>column</i>, except the <i>main-start</i> and <i>main-end</i> directions are swapped.</dd>
299
299
</dl>
300
300
301
-
<p>The 'flex-wrap' property controls whether the flexbox is <i>single-line</i> or <i>multi-line</i>, and the direction of the <i>cross axis</i>, which affects the direction new lines are stacked in and the meaning of the 'flex-align' and 'flex-line-pack' properties.</p>
301
+
<p>The 'flex-wrap' property controls whether the flexbox is <i>single-line</i> or <i>multi-line</i>, and the direction of the <i>cross axis</i>, which affects the direction new lines are stacked in and the meaning of the 'flex-align', 'flex-item-align', and 'flex-line-pack' properties.</p>
<p>After a flexbox's contents have finished their flexing, they can be aligned in both the <i>main axis</i> with 'flex-pack' and the <i>cross axis</i> with 'flex-align'. These properties make many common types of alignment trivial, including some things that were very difficult in CSS 2.1, like horizontal and vertical centering.</p>
447
+
<p>After a flexbox's contents have finished their flexing, they can be aligned in both the <i>main axis</i> with 'flex-pack' and the <i>cross axis</i> with 'flex-align' and 'flex-item-align'. These properties make many common types of alignment trivial, including some things that were very difficult in CSS 2.1, like horizontal and vertical centering.</p>
448
448
449
449
450
450
<h3id='flex-pack'>
@@ -498,7 +498,7 @@ <h3 id='flex-pack'>
498
498
499
499
500
500
<h3id='flex-align'>
501
-
Cross Axis Alignment: the 'flex-align' property</h3>
501
+
Cross Axis Alignment: the 'flex-align' and 'flex-item-align' properties</h3>
502
502
503
503
<tableclass=propdef>
504
504
<tr>
@@ -510,6 +510,30 @@ <h3 id='flex-align'>
510
510
<tr>
511
511
<th>Initial:
512
512
<td>stretch
513
+
<tr>
514
+
<th>Applies to:
515
+
<td>flexboxes
516
+
<tr>
517
+
<th>Inherited:
518
+
<td>no
519
+
<tr>
520
+
<th>Computed Value:
521
+
<td>specified value
522
+
<tr>
523
+
<th>Media:
524
+
<td>visual
525
+
</table>
526
+
527
+
<tableclass=propdef>
528
+
<tr>
529
+
<th>Name:
530
+
<td><dfn>flex-item-align</dfn>
531
+
<tr>
532
+
<th>Value:
533
+
<td>auto | start | end | center | baseline | stretch
534
+
<tr>
535
+
<th>Initial:
536
+
<td>auto
513
537
<tr>
514
538
<th>Applies to:
515
539
<td><i>flexbox items</i>
@@ -524,7 +548,9 @@ <h3 id='flex-align'>
524
548
<td>visual
525
549
</table>
526
550
527
-
<p>The 'flex-align' property aligns <i>flexbox items</i> in the <i>cross axis</i> of the current line of the flexbox, similar to 'flex-pack' but in the perpendicular axis. Note that 'flex-align' applies to individual <i>flexbox items</i>, while 'flex-pack' applies to the flexbox itself.</p>
551
+
<p><i>Flexbox items</i> can be aligned in the <i>cross axis</i> of the current line of the flexbox, similar to 'flex-pack' but in the perpendendicular direction. 'flex-align' sets the default alignment for all of the flexbox's <ititle="flexbox items">items</i>, including anonymous <i>flexbox items</i>. 'flex-item-align' allows this default alignment to be overridden for individual <i>flexbox items</i>.</p>
552
+
553
+
<p>A value of <dfnid="flex-item-align-auto">''auto''</dfn> for 'flex-item-align' makes the <i>flexbox item</i> use the alignment specified by 'flex-align' on its flexbox. The alignments are defined as:</p>
528
554
529
555
<dl>
530
556
<dt><dfnid="flex-align-start">start</dfn></dt>
@@ -540,7 +566,7 @@ <h3 id='flex-align'>
540
566
<dd>
541
567
<p>If the <i>flexbox item's</i> inline axis is the same as the <i>cross axis</i>, this value is identical to ''start''.</p>
542
568
543
-
<p>Otherwise, all <i>flexbox items</i> on the line with ''flex-align:baseline'' that don't run afoul of the previous paragraph are aligned such that their baselines align, and the item with the largest distance between its baseline and its <i>cross-start</i> margin edge is placed flush against the <i>cross-start</i> edge of the line.</p>
569
+
<p>Otherwise, all <i>flexbox items</i> on the line with an alignment of ''baseline'' that don't run afoul of the previous paragraph are aligned such that their baselines align, and the item with the largest distance between its baseline and its <i>cross-start</i> margin edge is placed flush against the <i>cross-start</i> edge of the line.</p>
0 commit comments