| 1 |
--- |
| 2 |
id: Stack |
| 3 |
section: foundations-and-styles |
| 4 |
subsection: layouts |
| 5 |
cssPrefix: pf-v6-l-stack |
| 6 |
---import './Stack.css' |
| 7 |
|
| 8 |
## Examples |
| 9 |
|
| 10 |
### Basic |
| 11 |
|
| 12 |
```html |
| 13 |
<div class="pf-v6-l-stack"> |
| 14 |
<div class="pf-v6-l-stack__item">content</div> |
| 15 |
<div class="pf-v6-l-stack__item pf-m-fill">pf-m-fill</div> |
| 16 |
<div class="pf-v6-l-stack__item">content</div> |
| 17 |
</div> |
| 18 |
|
| 19 |
``` |
| 20 |
|
| 21 |
### With gutter |
| 22 |
|
| 23 |
```html |
| 24 |
<div class="pf-v6-l-stack pf-m-gutter"> |
| 25 |
<div class="pf-v6-l-stack__item">content</div> |
| 26 |
<div class="pf-v6-l-stack__item pf-m-fill">pf-m-fill</div> |
| 27 |
<div class="pf-v6-l-stack__item">content</div> |
| 28 |
</div> |
| 29 |
|
| 30 |
``` |
| 31 |
|
| 32 |
## Documentation |
| 33 |
|
| 34 |
### Overview |
| 35 |
|
| 36 |
The stack layout is designed to position items vertically. |
| 37 |
|
| 38 |
### Usage |
| 39 |
|
| 40 |
| Class | Applied to | Outcome | |
| 41 |
| -- | -- | -- | |
| 42 |
| `.pf-v6-l-stack` | `*` | Initiates the stack layout. | |
| 43 |
| `.pf-v6-l-stack__item` | `*` | Initiates a stack item. | |
| 44 |
| `.pf-m-gutter` | `.pf-v6-l-stack` | Adds space between children by using the globally defined gutter value. | |
| 45 |
| `.pf-m-fill` | `.pf-v6-l-stack > *`, `.pf-v6-l-stack__item` | Specifies which item(s) should fill the avaiable vertical space. | |