Skip to content

Commit a837fc0

Browse files
chore(docs): update grid layout docs (closes #5332) (#5333)
* chore(docs): update grid layout docs (closes #5332) * Update package.json * Update README.md Co-authored-by: Jacob Müller <jacob.mueller.elz@gmail.com>
1 parent 9b0f372 commit a837fc0

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

src/components/layout/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,15 @@ each tier as needed. See the example below for a better idea of how it all works
450450

451451
Use flexbox alignment utilities to vertically and horizontally align columns.
452452

453+
**Note:** Internet Explorer 11 does not support vertical alignment of flex items when the flex
454+
container has a `min-height` as shown below.
455+
[See Flexbugs #3 for more details](https://github.com/philipwalton/flexbugs#flexbug-3).
456+
453457
### Vertical alignment
454458

459+
For vertical alignment of all grid cells in a row, use the `align-v` prop on `<b-row>`. Possible
460+
values are `'start'`, `'center'`, `'end'`, `'baseline'`, and `'stretch'`:
461+
455462
```html
456463
<b-container class="bv-example-row bv-example-row-flex-cols">
457464
<b-row align-v="start">
@@ -471,25 +478,47 @@ Use flexbox alignment utilities to vertically and horizontally align columns.
471478
<b-col>One of three columns</b-col>
472479
<b-col>One of three columns</b-col>
473480
</b-row>
481+
482+
<b-row align-v="baseline">
483+
<b-col style="font-size: 0.75rem;">One of three columns</b-col>
484+
<b-col>One of three columns</b-col>
485+
<b-col style="font-size: 1.25rem;">One of three columns</b-col>
486+
</b-row>
487+
488+
<b-row align-v="stretch">
489+
<b-col>One of three columns</b-col>
490+
<b-col>One of three columns</b-col>
491+
<b-col>One of three columns</b-col>
492+
</b-row>
474493
</b-container>
475494

476495
<!-- b-grid-vertical-alignment.vue -->
477496
```
478497

498+
For individual grid cell vertical alignment, use the `align-self` prop on `<b-col>`. Possible values
499+
are `'start'`, `'center'`, `'end'`, `'baseline'`, and `'stretch'`:
500+
479501
```html
480502
<b-container class="bv-example-row bv-example-row-flex-cols">
481503
<b-row>
482504
<b-col align-self="start">One of three columns</b-col>
483505
<b-col align-self="center">One of three columns</b-col>
484506
<b-col align-self="end">One of three columns</b-col>
485507
</b-row>
508+
<b-row>
509+
<b-col align-self="baseline">One of two columns</b-col>
510+
<b-col align-self="stretch">One of two columns</b-col>
511+
</b-row>
486512
</b-container>
487513

488514
<!-- b-grid-align-self.vue -->
489515
```
490516

491517
### Horizontal alignment
492518

519+
To horizontally align grid cells within a row, use the `align-h` prop on `<b-row>`. Possible values
520+
are: `'start'`, `'center'`, `'end'`, `'around'`, and `'between'`:
521+
493522
```html
494523
<b-container class="bv-example-row">
495524
<b-row align-h="start">

src/components/layout/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
{
2626
"prop": "alignV",
27-
"description": "Vertical alignment of all columns in a row: 'start', 'center', or 'end'"
27+
"description": "Vertical alignment of all columns in a row: 'start', 'center', 'end', 'baseline', or 'stretch'"
2828
},
2929
{
3030
"prop": "alignH",
@@ -66,7 +66,7 @@
6666
"props": [
6767
{
6868
"prop": "alignSelf",
69-
"description": "Vertical alignment of the grid cell with respect to the row: 'start', 'center', or 'end'"
69+
"description": "Vertical alignment of the grid cell with respect to the row: 'start', 'center', 'end', 'baseline', or 'stretch'"
7070
},
7171
{
7272
"prop": "col",

0 commit comments

Comments
 (0)