@patternfly/patternfly 5.0.0-alpha.49 → 5.0.0-alpha.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/base/patternfly-variables.css +1 -1
  2. package/components/Breadcrumb/breadcrumb.css +1 -5
  3. package/components/Breadcrumb/breadcrumb.scss +1 -8
  4. package/components/Divider/divider.css +12 -12
  5. package/components/List/list.css +1 -1
  6. package/components/List/list.scss +1 -1
  7. package/components/LogViewer/log-viewer.css +0 -3
  8. package/components/LogViewer/log-viewer.scss +0 -4
  9. package/components/Masthead/masthead.css +12 -12
  10. package/components/MultipleFileUpload/multiple-file-upload.css +3 -3
  11. package/components/MultipleFileUpload/multiple-file-upload.scss +3 -3
  12. package/components/Pagination/pagination.css +12 -12
  13. package/components/Tabs/tabs.css +24 -24
  14. package/components/TextInputGroup/text-input-group.css +1 -5
  15. package/components/TextInputGroup/text-input-group.scss +1 -7
  16. package/components/Toolbar/toolbar.css +54 -54
  17. package/components/_all.scss +1 -2
  18. package/docs/components/AppLauncher/examples/application-launcher.md +8 -7
  19. package/docs/components/Chip/examples/Chip.md +713 -4
  20. package/docs/components/ContextSelector/examples/context-selector.md +12 -12
  21. package/docs/components/DualListSelector/examples/DualListSelector.md +32 -32
  22. package/docs/components/LogViewer/examples/LogViewer.md +40 -40
  23. package/docs/components/Menu/examples/Menu.md +20 -18
  24. package/docs/components/Select/examples/Select.md +16 -14
  25. package/docs/components/TextInputGroup/examples/TextInputGroup.css +0 -13
  26. package/docs/components/TextInputGroup/examples/TextInputGroup.md +21 -21
  27. package/docs/components/Toolbar/examples/Toolbar.md +10 -10
  28. package/docs/components/TreeView/examples/TreeView.md +8 -7
  29. package/docs/demos/AboutModal/examples/AboutModal.md +21 -21
  30. package/docs/demos/Alert/examples/Alert.md +63 -63
  31. package/docs/demos/BackToTop/examples/BackToTop.md +21 -21
  32. package/docs/demos/Banner/examples/Banner.md +42 -42
  33. package/docs/demos/CardView/examples/CardView.md +21 -21
  34. package/docs/demos/ContextSelector/examples/ContextSelector.md +95 -91
  35. package/docs/demos/Dashboard/examples/Dashboard.md +21 -21
  36. package/docs/demos/DataList/examples/DataList.md +104 -105
  37. package/docs/demos/DescriptionList/examples/DescriptionList.md +63 -63
  38. package/docs/demos/Drawer/examples/Drawer.md +105 -105
  39. package/docs/demos/JumpLinks/examples/JumpLinks.md +126 -126
  40. package/docs/demos/Masthead/examples/Masthead.md +56 -55
  41. package/docs/demos/Modal/examples/Modal.md +126 -126
  42. package/docs/demos/Nav/examples/Nav.md +168 -168
  43. package/docs/demos/NotificationDrawer/examples/NotificationDrawer.md +105 -105
  44. package/docs/demos/Page/examples/Page.md +189 -189
  45. package/docs/demos/PrimaryDetail/examples/PrimaryDetail.md +153 -153
  46. package/docs/demos/Skeleton/examples/Skeleton.md +21 -21
  47. package/docs/demos/Table/examples/Table.md +339 -339
  48. package/docs/demos/Tabs/examples/Tabs.md +126 -126
  49. package/docs/demos/Toolbar/examples/Toolbar.md +50 -50
  50. package/docs/demos/Wizard/examples/Wizard.md +189 -189
  51. package/docs/layouts/Flex/examples/Flex.md +319 -215
  52. package/layouts/Flex/flex.css +738 -31
  53. package/layouts/Flex/flex.scss +101 -17
  54. package/package.json +1 -1
  55. package/patternfly-base-no-globals.css +1 -1
  56. package/patternfly-base.css +1 -1
  57. package/patternfly-no-globals.css +859 -389
  58. package/patternfly.css +859 -389
  59. package/patternfly.min.css +1 -1
  60. package/patternfly.min.css.map +1 -1
  61. package/sass-utilities/component-namespaces.scss +0 -3
  62. package/sass-utilities/functions.scss +9 -5
  63. package/sass-utilities/themes/dark/scss-variables.scss +1 -4
  64. package/components/Breadcrumb/themes/dark/breadcrumb.scss +0 -7
  65. package/components/SearchInput/search-input.css +0 -199
  66. package/components/SearchInput/search-input.scss +0 -231
  67. package/components/SearchInput/themes/dark/search-input.scss +0 -16
  68. package/docs/components/ChipGroup/examples/ChipGroup.md +0 -716
  69. package/docs/components/SearchInput/examples/SearchInput.css +0 -12
  70. package/docs/components/SearchInput/examples/SearchInput.md +0 -681
  71. /package/components/{ChipGroup → Chip}/chip-group.css +0 -0
  72. /package/components/{ChipGroup → Chip}/chip-group.scss +0 -0
@@ -6,24 +6,21 @@ cssPrefix: pf-v5-l-flex
6
6
 
7
7
  ## Introduction
8
8
 
9
- The flex layout is based on the CSS Flex properties where the layout determines how a flex item will grow or shrink to fit the space available in its container. The system relies on a default spacer value `--pf-v5-l-flex--spacer--base`, whose value is `--pf-v5-global--spacer--md` or `16px` that is applied to flex items. By default, `flex-wrap` is set to `wrap` and `align-items` is set to `baseline`.
9
+ The flex layout is based on the CSS Flex properties where the layout determines how a flex item will grow or shrink to fit the space available in its container. By default, a flex layout uses the [spacing system](#spacing-system) to space children along the main axis and [gap spacing](#gap-spacing) to space any wrapping children along the cross axis, `flex-wrap` is set to `wrap`, and `align-items` is set to `baseline`. The flex layout is infinitely nestable and can be nested to group items within.
10
10
 
11
- ### Default spacing
12
-
13
- * Flex items (not last child): `margin-right: 16px`.
14
- * Nested `.pf-v5-l-flex` containers (not last child): `margin-right: 16px`.
15
- * `.pf-m-column` direct descendants (not last child): `margin-bottom: 16px`.
16
- * `.pf-m-column` nested `.pf-v5-l-flex` containers (not last child): `margin-bottom: 16px`.
11
+ ### Spacing
17
12
 
18
- ## Features
13
+ The flex layout provides two ways of spacing its direct children.
19
14
 
20
- * `.pf-v5-l-flex` is infinitely nestable and can be used to group items within.
21
- * `.pf-m-spacer-{xs,sm,md,lg,xl,2xl,3xl}` can be applied to parent or direct children and changes the spacer value for only the element to which it is applied. Responsive spacers can be used by appending `{-on-[breakpoint]}` to `.pf-m-spacer-{size}`. Example: `.pf-m-spacer-lg-on-xl`.
22
- * `.pf-m-space-items-{xs,sm,md,lg,xl,2xl,3xl}` can be applied to `.pf-v5-l-flex` only and changes the spacing of direct children only. Responsive spacers can be used by appending `{-on-[breakpoint]}` to `.pf-m-space-items-{size}`. Example: `.pf-m-space-items-lg-on-xl`.
15
+ * [Spacing system](#spacing-system)
16
+ * The spacing system applies a margin between the flex layout's direct children to create space between items along the main axis only. The benefit of the spacing system is that it allows for variable spacing between direct children. Use the spacing system when individual flex items along the main axis require a different spacer than sibling items.
17
+ * [Gap spacing](#gap-spacing)
18
+ * Gap spacing uses flex `gap` to space the flex layout's direct children, and can be applied to space rows (`row-gap`), columns (`column-gap`), or both (`gap`). The benefit of gap spacing is that item wrapping is improved and improved item spacing that works better with CSS flex's logical layout properties. E.g., spacing in RTL layouts that rely on logical properties is improved. Use the gap system when all direct children should use the same spacer for rows, columns, or both.
19
+ * **Note** using `gap` along the main axis will override any other spacing applied using the spacing system.
23
20
 
24
21
  ### Breakpoints
25
22
 
26
- * [Breakpoints](/developer-resources/global-css-variables#breakpoint-variables-and-class-suffixes) `-on-sm`, `-on-md`, `-on-lg`, `-on-xl`, and `-on-2xl` are provided.
23
+ [Breakpoints](/developer-resources/global-css-variables#breakpoint-variables-and-class-suffixes) `-on-sm`, `-on-md`, `-on-lg`, `-on-xl`, and `-on-2xl` are provided.
27
24
 
28
25
  ### Usefulness
29
26
 
@@ -32,31 +29,30 @@ The flex layout is based on the CSS Flex properties where the layout determines
32
29
 
33
30
  ### Differences from utility class
34
31
 
35
- * It contains multiple css declarations and does not use the !important tag.
32
+ * It contains multiple css declarations and does not use the `!important` tag.
36
33
  * It does not require wrapping elements in columns or rows.
37
34
  * It breaks the dependency upon adding utility classes to each child.
38
35
  * It can be applied to container elements or components.
39
36
 
40
- ## Examples
37
+ # Examples
38
+
39
+ ## Basic flex layout
41
40
 
42
- ### Basic
41
+ ### Basic flex example
43
42
 
44
43
  ```html
45
- <h3>
46
- Basic flex -
47
- <code>.pf-v5-l-flex</code>.
48
- </h3>
49
44
  <div class="pf-v5-l-flex">
50
45
  <div class="pf-v5-l-flex__item">Flex item</div>
51
46
  <div class="pf-v5-l-flex__item">Flex item</div>
52
47
  <div class="pf-v5-l-flex__item">Flex item</div>
53
48
  <div class="pf-v5-l-flex__item">Flex item</div>
54
49
  </div>
55
- <br />
56
- <h3>
57
- Flex nesting -
58
- <code>.pf-v5-l-flex > .pf-v5-l-flex</code>.
59
- </h3>
50
+
51
+ ```
52
+
53
+ ### Nested flex example
54
+
55
+ ```html
60
56
  <div class="pf-v5-l-flex">
61
57
  <div class="pf-v5-l-flex">
62
58
  <div class="pf-v5-l-flex__item">Flex item</div>
@@ -68,8 +64,12 @@ The flex layout is based on the CSS Flex properties where the layout determines
68
64
  <div class="pf-v5-l-flex__item">Flex item</div>
69
65
  </div>
70
66
  </div>
71
- <br />
72
- <h3>Nested flex and items.</h3>
67
+
68
+ ```
69
+
70
+ ### Nested flex and items example
71
+
72
+ ```html
73
73
  <div class="pf-v5-l-flex">
74
74
  <div class="pf-v5-l-flex">
75
75
  <div class="pf-v5-l-flex__item">Flex item</div>
@@ -86,22 +86,35 @@ The flex layout is based on the CSS Flex properties where the layout determines
86
86
 
87
87
  ```
88
88
 
89
+ ### Basic flex layout overview
90
+
89
91
  The CSS approach, by keeping specificity low on base class properties and resetting css variable values at higher specificities, allows any spacer property to be overwritten with a single selector (specificity of 10 or greater).
90
92
 
91
- ### Usage
93
+ ### Basic flex layout usage
92
94
 
93
95
  | Class | Applied to | Outcome |
94
96
  | -- | -- | -- |
95
97
  | `.pf-v5-l-flex` | `*` | Initiates the flex layout. **Required** |
96
98
  | `.pf-v5-l-flex__item` | `.pf-v5-l-flex > *` | Initiates a flex item. **Required** |
97
99
 
98
- ### Spacing
100
+ ## Spacing system
101
+
102
+ ### Spacing system on parent example
103
+
104
+ ```html
105
+ <div class="pf-v5-l-flex pf-m-space-items-2xl">
106
+ <div class="pf-v5-l-flex__item">Flex item</div>
107
+ <div class="pf-v5-l-flex__item">Flex item</div>
108
+ <div class="pf-v5-l-flex__item">Flex item</div>
109
+ <div class="pf-v5-l-flex__item">Flex item</div>
110
+ <div class="pf-v5-l-flex__item">Flex item</div>
111
+ </div>
112
+
113
+ ```
114
+
115
+ ### Spacing system on children example
99
116
 
100
117
  ```html
101
- <h3>
102
- Individually spaced items -
103
- <code>.pf-m-spacer-{xs,sm,md,lg,xl,2xl,3xl}</code>.
104
- </h3>
105
118
  <div class="pf-v5-l-flex">
106
119
  <div class="pf-v5-l-flex__item pf-m-spacer-none">Item - none</div>
107
120
  <div class="pf-v5-l-flex__item pf-m-spacer-xs">Item - xs</div>
@@ -111,25 +124,72 @@ The CSS approach, by keeping specificity low on base class properties and resett
111
124
  <div class="pf-v5-l-flex__item pf-m-spacer-xl">Item - xl</div>
112
125
  <div class="pf-v5-l-flex__item pf-m-spacer-2xl">Item - 2xl</div>
113
126
  <div class="pf-v5-l-flex__item pf-m-spacer-3xl">Item - 3xl</div>
127
+ <div class="pf-v5-l-flex__item pf-m-spacer-4xl">Item - 4xl</div>
114
128
  </div>
115
- <br />
116
- <h3>
117
- Flex with modified spacing -
118
- <code>.pf-m-space-items-xl</code>.
119
- </h3>
120
- <div class="pf-v5-l-flex pf-m-space-items-xl">
129
+
130
+ ```
131
+
132
+ ### Spacing system on parent and children example
133
+
134
+ ```html
135
+ <div class="pf-v5-l-flex pf-m-space-items-2xl">
136
+ <div class="pf-v5-l-flex__item">Flex item</div>
137
+ <div class="pf-v5-l-flex__item pf-m-spacer-md">Flex item - md</div>
138
+ <div class="pf-v5-l-flex__item">Flex item</div>
139
+ <div class="pf-v5-l-flex__item">Flex item</div>
140
+ <div class="pf-v5-l-flex__item">Flex item</div>
141
+ </div>
142
+
143
+ ```
144
+
145
+ ### Spacing system usage
146
+
147
+ | Class | Applied to | Outcome |
148
+ | -- | -- | -- |
149
+ | `.pf-m-space-items-{none, xs, sm, md, lg, xl, 2xl, 3xl, 4xl}{-on-[breakpoint]}` | `.pf-v5-l-flex` | Modifies the spacer between direct children along the main axis of a flex layout. |
150
+ | `.pf-m-spacer-{none, xs, sm, md, lg, xl, 2xl, 3xl, 4xl}{-on-[breakpoint]}` | `.pf-v5-l-flex > *` | Modifies the spacer for any individual direct child along the main axis of a flex layout. |
151
+
152
+ ## Gap spacing
153
+
154
+ ### Row gap example
155
+
156
+ ```html
157
+ <div class="pf-v5-l-flex pf-m-row-gap-2xl">
158
+ <div class="pf-v5-l-flex__item">Flex item</div>
159
+ <div class="pf-v5-l-flex__item">Flex item</div>
160
+ <div class="pf-v5-l-flex__item">Flex item</div>
161
+ <div class="pf-v5-l-flex__item">Flex item</div>
162
+ <div class="pf-v5-l-flex__item">Flex item</div>
163
+ <div class="pf-v5-l-flex__item">Flex item</div>
164
+ <div class="pf-v5-l-flex__item">Flex item</div>
165
+ <div class="pf-v5-l-flex__item">Flex item</div>
166
+ <div class="pf-v5-l-flex__item">Flex item</div>
167
+ <div class="pf-v5-l-flex__item">Flex item</div>
168
+ <div class="pf-v5-l-flex__item">Flex item</div>
121
169
  <div class="pf-v5-l-flex__item">Flex item</div>
122
170
  <div class="pf-v5-l-flex__item">Flex item</div>
123
171
  <div class="pf-v5-l-flex__item">Flex item</div>
124
172
  <div class="pf-v5-l-flex__item">Flex item</div>
125
173
  <div class="pf-v5-l-flex__item">Flex item</div>
126
174
  </div>
127
- <br />
128
- <h3>
129
- Flex with modified spacing -
130
- <code>.pf-m-space-items-none</code>.
131
- </h3>
132
- <div class="pf-v5-l-flex pf-m-space-items-none">
175
+
176
+ ```
177
+
178
+ ### Column gap example
179
+
180
+ ```html
181
+ <div class="pf-v5-l-flex pf-m-column-gap-2xl">
182
+ <div class="pf-v5-l-flex__item">Flex item</div>
183
+ <div class="pf-v5-l-flex__item">Flex item</div>
184
+ <div class="pf-v5-l-flex__item">Flex item</div>
185
+ <div class="pf-v5-l-flex__item">Flex item</div>
186
+ <div class="pf-v5-l-flex__item">Flex item</div>
187
+ <div class="pf-v5-l-flex__item">Flex item</div>
188
+ <div class="pf-v5-l-flex__item">Flex item</div>
189
+ <div class="pf-v5-l-flex__item">Flex item</div>
190
+ <div class="pf-v5-l-flex__item">Flex item</div>
191
+ <div class="pf-v5-l-flex__item">Flex item</div>
192
+ <div class="pf-v5-l-flex__item">Flex item</div>
133
193
  <div class="pf-v5-l-flex__item">Flex item</div>
134
194
  <div class="pf-v5-l-flex__item">Flex item</div>
135
195
  <div class="pf-v5-l-flex__item">Flex item</div>
@@ -139,24 +199,43 @@ The CSS approach, by keeping specificity low on base class properties and resett
139
199
 
140
200
  ```
141
201
 
142
- **Applying `.pf-m-spacer-{size}` to direct descendants of `.pf-v5-l-flex` will override css variable value.**
202
+ ### Gap example
143
203
 
144
- **Applying `.pf-m-space-items-{size}` to `.pf-v5-l-flex` will override css variable values for direct descendants, excluding last child. This spacing can be overridden for direct descendant with `.pf-m-spacer-{size}`.**
204
+ ```html
205
+ <div class="pf-v5-l-flex pf-m-gap-2xl">
206
+ <div class="pf-v5-l-flex__item">Flex item</div>
207
+ <div class="pf-v5-l-flex__item">Flex item</div>
208
+ <div class="pf-v5-l-flex__item">Flex item</div>
209
+ <div class="pf-v5-l-flex__item">Flex item</div>
210
+ <div class="pf-v5-l-flex__item">Flex item</div>
211
+ <div class="pf-v5-l-flex__item">Flex item</div>
212
+ <div class="pf-v5-l-flex__item">Flex item</div>
213
+ <div class="pf-v5-l-flex__item">Flex item</div>
214
+ <div class="pf-v5-l-flex__item">Flex item</div>
215
+ <div class="pf-v5-l-flex__item">Flex item</div>
216
+ <div class="pf-v5-l-flex__item">Flex item</div>
217
+ <div class="pf-v5-l-flex__item">Flex item</div>
218
+ <div class="pf-v5-l-flex__item">Flex item</div>
219
+ <div class="pf-v5-l-flex__item">Flex item</div>
220
+ <div class="pf-v5-l-flex__item">Flex item</div>
221
+ <div class="pf-v5-l-flex__item">Flex item</div>
222
+ </div>
145
223
 
146
- ### Usage
224
+ ```
225
+
226
+ ### Gap spacing usage
147
227
 
148
228
  | Class | Applied to | Outcome |
149
229
  | -- | -- | -- |
150
- | `.pf-m-spacer-{none, xs, sm, md, lg, xl, 2xl}{-on-[breakpoint]}` | `.pf-v5-l-flex > .pf-v5-l-flex`, `.pf-v5-l-flex__item` | Modifies a nested flex layout or a flex item spacing. |
151
- | `.pf-m-space-items-{none, xs, sm, md, lg, xl, 2xl}{-on-[breakpoint]}` | `.pf-v5-l-flex` | Modifies the flex layout direct descendant spacing. |
230
+ | `.pf-m-gap{-[none, xs, sm, md, lg, xl, 2xl, 3xl, 4xl]}{-on-[breakpoint]}` | `.pf-v5-l-flex` | Modifies the space between columns and rows. |
231
+ | `.pf-m-row-gap{-[none, xs, sm, md, lg, xl, 2xl, 3xl, 4xl]}{-on-[breakpoint]}` | `.pf-v5-l-flex` | Modifies the space between rows. |
232
+ | `.pf-m-column-gap{-[none, xs, sm, md, lg, xl, 2xl, 3xl, 4xl]}{-on-[breakpoint]}` | `.pf-v5-l-flex` | Modifies the space between columns. |
233
+
234
+ ## Layout modifiers
152
235
 
153
- ### Layout modifiers
236
+ ### Default layout example
154
237
 
155
238
  ```html
156
- <h3>
157
- Default layout
158
- <code>.pf-v5-l-flex</code>.
159
- </h3>
160
239
  <div class="pf-v5-l-flex ws-example-flex-border">
161
240
  <div class="pf-v5-l-flex__item">Flex item</div>
162
241
 
@@ -164,11 +243,12 @@ The CSS approach, by keeping specificity low on base class properties and resett
164
243
 
165
244
  <div class="pf-v5-l-flex__item">Flex item</div>
166
245
  </div>
167
- <br />
168
- <h3>
169
- Inline flex
170
- <code>.pf-m-inline-flex</code>.
171
- </h3>
246
+
247
+ ```
248
+
249
+ ### Inline flex layout example
250
+
251
+ ```html
172
252
  <div class="pf-v5-l-flex pf-m-inline-flex ws-example-flex-border">
173
253
  <div class="pf-v5-l-flex__item">Flex item</div>
174
254
 
@@ -176,12 +256,14 @@ The CSS approach, by keeping specificity low on base class properties and resett
176
256
 
177
257
  <div class="pf-v5-l-flex__item">Flex item</div>
178
258
  </div>
179
- <br />
180
- <h3>
181
- Adjusting width with
182
- <code>.pf-m-grow</code>. In this example, the first group is set to
183
- <code>.pf-m-grow</code> and will occupy the remaining available space.
184
- </h3>
259
+
260
+ ```
261
+
262
+ ### Basic flex grow example
263
+
264
+ Adjusting width with `.pf-m-grow`, which sets `flex-grow: 1`. In this example, the first group is set to `.pf-m-grow`, will occupy the remaining available space.
265
+
266
+ ```html
185
267
  <div class="pf-v5-l-flex">
186
268
  <div
187
269
  class="pf-v5-l-flex pf-m-grow ws-example-flex-border"
@@ -202,12 +284,14 @@ The CSS approach, by keeping specificity low on base class properties and resett
202
284
  <div class="pf-v5-l-flex__item">Flex item</div>
203
285
  </div>
204
286
  </div>
205
- <br />
206
- <h3>
207
- Adjusting width with
208
- <code>.pf-m-flex-1</code>. In this example, all groups are set to
209
- <code>.pf-m-flex-1</code>. They will share available space equally.
210
- </h3>
287
+
288
+ ```
289
+
290
+ ### Flex grow 1 example
291
+
292
+ Adjusting width with `.pf-m-flex-1`. In this example, all groups are set to `.pf-m-flex-1`. They will share available space equally.
293
+
294
+ ```html
211
295
  <div class="pf-v5-l-flex">
212
296
  <div
213
297
  class="pf-v5-l-flex pf-m-flex-1 ws-example-flex-border"
@@ -234,11 +318,12 @@ The CSS approach, by keeping specificity low on base class properties and resett
234
318
  <div class="pf-v5-l-flex__item">Flex item</div>
235
319
  </div>
236
320
  </div>
237
- <br />
238
- <h3>
239
- Specifying column widths with
240
- <code>.pf-m-flex-{1,2,3}</code>.
241
- </h3>
321
+
322
+ ```
323
+
324
+ ### Flex grow 1-4 example
325
+
326
+ ```html
242
327
  <div class="pf-v5-l-flex">
243
328
  <div
244
329
  class="pf-v5-l-flex pf-m-flex-1 ws-example-flex-border"
@@ -253,6 +338,8 @@ The CSS approach, by keeping specificity low on base class properties and resett
253
338
  <div class="pf-v5-l-flex__item">Flex item</div>
254
339
 
255
340
  <div class="pf-v5-l-flex__item">Flex item</div>
341
+
342
+ <div class="pf-v5-l-flex__item">Flex item</div>
256
343
  </div>
257
344
  <div
258
345
  class="pf-v5-l-flex pf-m-flex-3 ws-example-flex-border"
@@ -261,14 +348,18 @@ The CSS approach, by keeping specificity low on base class properties and resett
261
348
  <div class="pf-v5-l-flex__item">Flex item</div>
262
349
 
263
350
  <div class="pf-v5-l-flex__item">Flex item</div>
264
-
351
+ </div>
352
+ <div
353
+ class="pf-v5-l-flex pf-m-flex-4 ws-example-flex-border"
354
+ data-label=".pf-m-flex-4"
355
+ >
265
356
  <div class="pf-v5-l-flex__item">Flex item</div>
266
357
  </div>
267
358
  </div>
268
359
 
269
360
  ```
270
361
 
271
- ### Usage
362
+ ### Layout modifiers usage
272
363
 
273
364
  | Class | Applied to | Outcome |
274
365
  | -- | -- | -- |
@@ -283,24 +374,22 @@ The CSS approach, by keeping specificity low on base class properties and resett
283
374
  | `.pf-m-flex-default{-on-[breakpoint]}` | `.pf-v5-l-flex > .pf-v5-l-flex`, `.pf-v5-l-flex__item` | Resets a nested flex layout or flex item flex shorthand property to 0 1 auto. |
284
375
  | `.pf-m-flex-none{-on-[breakpoint]}` | `.pf-v5-l-flex > .pf-v5-l-flex`, `.pf-v5-l-flex__item` | Modifies a nested flex layout or flex item flex shorthand property to none. |
285
376
 
286
- ### Column layout modifiers
377
+ ## Column layout modifiers
378
+
379
+ ### Basic column example
287
380
 
288
381
  ```html
289
- <h3>
290
- Flex column layout. When
291
- <code>.pf-m-column</code> is applied to
292
- <code>.pf-v5-l-flex</code>, spacing will be applied to margin-bottom for direct descendants.
293
- </h3>
294
382
  <div class="pf-v5-l-flex pf-m-column">
295
383
  <div class="pf-v5-l-flex__item">Flex item</div>
296
384
  <div class="pf-v5-l-flex__item">Flex item</div>
297
385
  <div class="pf-v5-l-flex__item">Flex item</div>
298
386
  </div>
299
- <br />
300
- <h3>
301
- Stacking
302
- <code>.pf-v5-l-flex</code> elements.
303
- </h3>
387
+
388
+ ```
389
+
390
+ ### Nested column example
391
+
392
+ ```html
304
393
  <div class="pf-v5-l-flex pf-m-column">
305
394
  <div class="pf-v5-l-flex">
306
395
  <div class="pf-v5-l-flex__item">Flex item</div>
@@ -316,11 +405,7 @@ The CSS approach, by keeping specificity low on base class properties and resett
316
405
  </div>
317
406
  </div>
318
407
  <br />
319
- <h3>
320
- Nesting
321
- <code>.pf-v5-l-flex</code> elements and setting to
322
- <code>.pf-m-column</code>.
323
- </h3>
408
+ <br />
324
409
  <div class="pf-v5-l-flex">
325
410
  <div class="pf-v5-l-flex pf-m-column">
326
411
  <div class="pf-v5-l-flex__item">Flex item</div>
@@ -341,13 +426,11 @@ The CSS approach, by keeping specificity low on base class properties and resett
341
426
  | -- | -- | -- |
342
427
  | `.pf-m-column{-on-[breakpoint]}` | `.pf-v5-l-flex` | Modifies flex-direction property to column. |
343
428
 
344
- ### Responsive layout modifiers
429
+ ## Responsive layouts
430
+
431
+ ### Flex direction responsive example
345
432
 
346
433
  ```html
347
- <h3>
348
- Switching between flex-direction column and row at breakpoints (
349
- <code>-on-lg</code>).
350
- </h3>
351
434
  <div class="pf-v5-l-flex pf-m-column pf-m-row-on-lg">
352
435
  <div class="pf-v5-l-flex">
353
436
  <div class="pf-v5-l-flex__item">Flex item</div>
@@ -362,15 +445,12 @@ The CSS approach, by keeping specificity low on base class properties and resett
362
445
  </div>
363
446
  </div>
364
447
  <br />
365
- <h3>
366
- Switching between flex-direction column and row at breakpoints (
367
- <code>-on-lg</code>). If content is likely to wrap, modifiers will need to be used to control width. The example below wraps because the flex item expands in response to long paragraph text.
368
- </h3>
448
+ <br />
369
449
  <div class="pf-v5-l-flex pf-m-column pf-m-row-on-lg">
370
450
  <div class="pf-v5-l-flex">
371
451
  <div class="pf-v5-l-flex__item">Flex item</div>
372
452
  <div class="pf-v5-l-flex__item">
373
- <b>Because this text is long enough to wrap, this item's width will force the adjacent item to wrap.</b> Lorem ipsum dolor sit amet consectetur adipisicing elit. Est animi modi temporibus, alias qui obcaecati ullam dolor nam, nulla magni iste rem praesentium numquam provident amet ut nesciunt harum accusamus.
453
+ <b>Because this text is long enough to wrap, this item's width will force the adjacent item to wrap. If content is likely to wrap, modifiers will need to be used to control width.</b> Lorem ipsum dolor sit amet consectetur adipisicing elit. Est animi modi temporibus, alias qui obcaecati ullam dolor nam, nulla magni iste rem praesentium numquam provident amet ut nesciunt harum accusamus.
374
454
  </div>
375
455
  </div>
376
456
 
@@ -380,17 +460,16 @@ The CSS approach, by keeping specificity low on base class properties and resett
380
460
  </div>
381
461
  </div>
382
462
  <br />
383
- <h3>
384
- Switching between flex-direction column and row at breakpoints (
385
- <code>-on-lg</code>). To control the width of the flex item, set
386
- <code>.pf-m-flex-1</code> on the flex group containing the long paragraph text.
387
- </h3>
463
+ <br />
388
464
  <div class="pf-v5-l-flex pf-m-column pf-m-row-on-lg">
389
465
  <div class="pf-v5-l-flex pf-m-flex-1">
390
466
  <div class="pf-v5-l-flex__item">Flex item</div>
391
- <div
392
- class="pf-v5-l-flex__item pf-m-flex-1"
393
- >Lorem ipsum dolor sit amet consectetur adipisicing elit. Est animi modi temporibus, alias qui obcaecati ullam dolor nam, nulla magni iste rem praesentium numquam provident amet ut nesciunt harum accusamus.</div>
467
+ <div class="pf-v5-l-flex__item pf-m-flex-1">
468
+ <b>
469
+ To control the width of the flex item, set
470
+ <code>.pf-m-flex-1</code>.
471
+ </b> Lorem ipsum dolor sit amet consectetur adipisicing elit. Est animi modi temporibus, alias qui obcaecati ullam dolor nam, nulla magni iste rem praesentium numquam provident amet ut nesciunt harum accusamus.
472
+ </div>
394
473
  </div>
395
474
 
396
475
  <div class="pf-v5-l-flex pf-m-column">
@@ -401,20 +480,20 @@ The CSS approach, by keeping specificity low on base class properties and resett
401
480
 
402
481
  ```
403
482
 
404
- ### Usage
483
+ ### Responsive layouts usage
405
484
 
406
485
  | Class | Applied to | Outcome |
407
486
  | -- | -- | -- |
408
487
  | `.pf-m-column{-on-[breakpoint]}` | `.pf-v5-l-flex` | Modifies flex-direction property to column. |
409
488
  | `.pf-m-row{-on-[breakpoint]}` | `.pf-v5-l-flex` | Modifies flex-direction property to row. |
410
489
 
411
- ### Alignment
490
+ ## Alignment
491
+
492
+ ### Basic align right example
493
+
494
+ Aligning right with `.pf-m-align-right`. This solution will always align element right by setting margin-left: auto, including when wrapped.
412
495
 
413
496
  ```html
414
- <h3>
415
- Aligning right with
416
- <code>.pf-m-align-right</code>. This solution will always align element right by setting margin-left: auto, including when wrapped.
417
- </h3>
418
497
  <div class="pf-v5-l-flex ws-example-flex-border">
419
498
  <div class="pf-v5-l-flex__item">Flex item</div>
420
499
  <div class="pf-v5-l-flex__item">Flex item</div>
@@ -422,14 +501,22 @@ The CSS approach, by keeping specificity low on base class properties and resett
422
501
  <div class="pf-v5-l-flex__item pf-m-align-right">Flex item</div>
423
502
  <div class="pf-v5-l-flex__item">Flex item</div>
424
503
  </div>
425
- <br />
426
- <h3>Align right on single item.</h3>
504
+
505
+ ```
506
+
507
+ ### Align right on single item example
508
+
509
+ ```html
427
510
  <div class="pf-v5-l-flex ws-example-flex-border">
428
511
  <div class="pf-v5-l-flex__item pf-m-align-right">Flex item</div>
429
512
  <div class="pf-v5-l-flex__item">Flex item</div>
430
513
  </div>
431
- <br />
432
- <h3>Align right on multiple groups.</h3>
514
+
515
+ ```
516
+
517
+ ### Align right on multiple groups example
518
+
519
+ ```html
433
520
  <div class="pf-v5-l-flex">
434
521
  <div class="pf-v5-l-flex">
435
522
  <div class="pf-v5-l-flex__item">Flex item</div>
@@ -444,11 +531,12 @@ The CSS approach, by keeping specificity low on base class properties and resett
444
531
  <div class="pf-v5-l-flex__item">Flex item</div>
445
532
  </div>
446
533
  </div>
447
- <br />
448
- <h3>
449
- Using
450
- <code>.pf-m-flex-1</code> to align adjacent content.
451
- </h3>
534
+
535
+ ```
536
+
537
+ #### Alignment using .pf-m-flex-1 example
538
+
539
+ ```html
452
540
  <div class="pf-v5-l-flex">
453
541
  <div class="pf-v5-l-flex pf-m-flex-1">
454
542
  <div class="pf-v5-l-flex__item">Flex item</div>
@@ -461,11 +549,12 @@ The CSS approach, by keeping specificity low on base class properties and resett
461
549
  <div class="pf-v5-l-flex__item">Flex item</div>
462
550
  </div>
463
551
  </div>
464
- <br />
465
- <h3>
466
- Aligning nested columns with
467
- <code>.pf-m-align-self-flex-end</code>.
468
- </h3>
552
+
553
+ ```
554
+
555
+ ### Alignment using .pf-m-align-self-flex-end example
556
+
557
+ ```html
469
558
  <div class="pf-v5-l-flex">
470
559
  <div class="pf-v5-l-flex pf-m-column">
471
560
  <div class="pf-v5-l-flex__item">Flex item</div>
@@ -477,11 +566,12 @@ The CSS approach, by keeping specificity low on base class properties and resett
477
566
  <div class="pf-v5-l-flex__item">Flex item</div>
478
567
  </div>
479
568
  </div>
480
- <br />
481
- <h3>
482
- Aligning nested columns with
483
- <code>.pf-m-align-self-center</code>.
484
- </h3>
569
+
570
+ ```
571
+
572
+ ### Aligning nested columns with .pf-m-align-self-center example
573
+
574
+ ```html
485
575
  <div class="pf-v5-l-flex">
486
576
  <div class="pf-v5-l-flex pf-m-column">
487
577
  <div class="pf-v5-l-flex__item">Flex item</div>
@@ -493,11 +583,12 @@ The CSS approach, by keeping specificity low on base class properties and resett
493
583
  <div class="pf-v5-l-flex__item">Flex item</div>
494
584
  </div>
495
585
  </div>
496
- <br />
497
- <h3>
498
- Aligning nested columns with
499
- <code>.pf-m-align-self-baseline</code>.
500
- </h3>
586
+
587
+ ```
588
+
589
+ ### Aligning nested columns with .pf-m-align-self-baseline example
590
+
591
+ ```html
501
592
  <div class="pf-v5-l-flex">
502
593
  <div class="pf-v5-l-flex pf-m-column">
503
594
  <div class="pf-v5-l-flex__item">Flex item</div>
@@ -509,11 +600,12 @@ The CSS approach, by keeping specificity low on base class properties and resett
509
600
  <div class="pf-v5-l-flex__item">Flex item</div>
510
601
  </div>
511
602
  </div>
512
- <br />
513
- <h3>
514
- Aligning nested columns with
515
- <code>.pf-m-align-self-stretch</code>.
516
- </h3>
603
+
604
+ ```
605
+
606
+ ### Aligning nested columns with .pf-m-align-self-stretch example
607
+
608
+ ```html
517
609
  <div class="pf-v5-l-flex">
518
610
  <div class="pf-v5-l-flex pf-m-column">
519
611
  <div class="pf-v5-l-flex__item">Flex item</div>
@@ -528,7 +620,7 @@ The CSS approach, by keeping specificity low on base class properties and resett
528
620
 
529
621
  ```
530
622
 
531
- ### Usage
623
+ ### Alignment usage
532
624
 
533
625
  | Class | Applied to | Outcome |
534
626
  | -- | -- | -- |
@@ -540,24 +632,23 @@ The CSS approach, by keeping specificity low on base class properties and resett
540
632
  | `.pf-m-align-self-flex-baseline{-on-[breakpoint]}` | `.pf-v5-l-flex > .pf-v5-l-flex`, `.pf-v5-l-flex__item` | Modifies align-self property to baseline. |
541
633
  | `.pf-m-align-self-flex-stretch{-on-[breakpoint]}` | `.pf-v5-l-flex > .pf-v5-l-flex`, `.pf-v5-l-flex__item` | Modifies align-self property to stretch. |
542
634
 
543
- ### Justification
635
+ ## Justification
636
+
637
+ ### Justify content flex end example
544
638
 
545
639
  ```html
546
- <h3>
547
- Justify content with
548
- <code>.pf-m-justify-content-flex-end</code>.
549
- </h3>
550
640
  <div class="pf-v5-l-flex pf-m-justify-content-flex-end ws-example-flex-border">
551
641
  <div class="pf-v5-l-flex__item">Flex item</div>
552
642
  <div class="pf-v5-l-flex__item">Flex item</div>
553
643
  <div class="pf-v5-l-flex__item">Flex item</div>
554
644
  <div class="pf-v5-l-flex__item">Flex item</div>
555
645
  </div>
556
- <br />
557
- <h3>
558
- Justify content with
559
- <code>.pf-m-justify-content-space-between</code>.
560
- </h3>
646
+
647
+ ```
648
+
649
+ ### Justify content space between example
650
+
651
+ ```html
561
652
  <div
562
653
  class="pf-v5-l-flex pf-m-justify-content-space-between ws-example-flex-border"
563
654
  >
@@ -565,11 +656,12 @@ The CSS approach, by keeping specificity low on base class properties and resett
565
656
  <div class="pf-v5-l-flex__item">Flex item</div>
566
657
  <div class="pf-v5-l-flex__item">Flex item</div>
567
658
  </div>
568
- <br />
569
- <h3>
570
- Justify content with
571
- <code>.pf-m-justify-content-flex-start</code>.
572
- </h3>
659
+
660
+ ```
661
+
662
+ ### Justify content flex start example
663
+
664
+ ```html
573
665
  <div
574
666
  class="pf-v5-l-flex pf-m-justify-content-flex-start ws-example-flex-border"
575
667
  >
@@ -580,48 +672,17 @@ The CSS approach, by keeping specificity low on base class properties and resett
580
672
 
581
673
  ```
582
674
 
583
- ### Ordering
584
-
585
- Ordering - Ordering can be applied to nested <code>.pf-v5-l-flex</code> and <code>.pf-v5-l-flex\_\_item</code>s. Spacing may need to be managed based on how items are ordered. Because order could apply to an innumerable number of elements, order is set inline as `--pf-v5-l-flex--item--Order{-on-[breakpoint]}: {order}`.
586
-
587
- ### First last ordering
588
-
589
- ```html
590
- <div class="pf-v5-l-flex">
591
- <div
592
- class="pf-v5-l-flex__item pf-m-spacer-none"
593
- style="--pf-v5-l-flex--item--Order: 2;"
594
- >Item A</div>
595
- <div class="pf-v5-l-flex__item">Item B</div>
596
- <div
597
- class="pf-v5-l-flex__item pf-m-spacer-md"
598
- style="--pf-v5-l-flex--item--Order: -1;"
599
- >Item C</div>
600
- </div>
601
-
602
- ```
603
-
604
- ### Responsive first last ordering
675
+ | Class | Applied to | Outcome |
676
+ | -- | -- | -- |
677
+ | `.pf-m-justify-content-flex-end{-on-[breakpoint]}` | `.pf-v5-l-flex` | Modifies justification property and descendant spacing. |
678
+ | `.pf-m-justify-content-flex-space-between{-on-[breakpoint]}` | `.pf-v5-l-flex` | Modifies justification property and descendant spacing. |
679
+ | `.pf-m-justify-content-flex-start{-on-[breakpoint]}` | `.pf-v5-l-flex` | Modifies justification property and descendant spacing, used primarily to reset spacing to default. |
605
680
 
606
- ```html
607
- <div class="pf-v5-l-flex">
608
- <div
609
- class="pf-v5-l-flex__item pf-m-spacer-none-on-lg"
610
- style="--pf-v5-l-flex--item--Order-on-lg: 2;"
611
- >Item A</div>
612
- <div
613
- class="pf-v5-l-flex__item pf-m-spacer-none-on-md pf-m-spacer-md-on-lg"
614
- style="--pf-v5-l-flex--item--Order: -1; --pf-v5-l-flex--item--Order-on-md: 1;"
615
- >Item B</div>
616
- <div
617
- class="pf-v5-l-flex__item pf-m-spacer-md"
618
- style="--pf-v5-l-flex--item--Order-on-md: -1;"
619
- >Item C</div>
620
- </div>
681
+ ## Ordering
621
682
 
622
- ```
683
+ Ordering - Ordering can be applied to nested `.pf-v5-l-flex` and `.pf-v5-l-flex__item`s. Spacing may need to be managed based on how items are ordered. Because order could apply to an innumerable number of elements, order is set inline as `--pf-v5-l-flex--item--Order{-on-[breakpoint]}: {order}`.
623
684
 
624
- ### Ordering example
685
+ ### Basic ordering example
625
686
 
626
687
  ```html
627
688
  <div class="pf-v5-l-flex">
@@ -659,7 +720,44 @@ Ordering - Ordering can be applied to nested <code>.pf-v5-l-flex</code> and <cod
659
720
 
660
721
  ```
661
722
 
662
- ### Responsive ordering
723
+ ### First and last ordering example
724
+
725
+ ```html
726
+ <div class="pf-v5-l-flex">
727
+ <div
728
+ class="pf-v5-l-flex__item pf-m-spacer-none"
729
+ style="--pf-v5-l-flex--item--Order: 2;"
730
+ >Item A</div>
731
+ <div class="pf-v5-l-flex__item">Item B</div>
732
+ <div
733
+ class="pf-v5-l-flex__item pf-m-spacer-md"
734
+ style="--pf-v5-l-flex--item--Order: -1;"
735
+ >Item C</div>
736
+ </div>
737
+
738
+ ```
739
+
740
+ ### Responsive first last ordering example
741
+
742
+ ```html
743
+ <div class="pf-v5-l-flex">
744
+ <div
745
+ class="pf-v5-l-flex__item pf-m-spacer-none-on-lg"
746
+ style="--pf-v5-l-flex--item--Order-on-lg: 2;"
747
+ >Item A</div>
748
+ <div
749
+ class="pf-v5-l-flex__item pf-m-spacer-none-on-md pf-m-spacer-md-on-lg"
750
+ style="--pf-v5-l-flex--item--Order: -1; --pf-v5-l-flex--item--Order-on-md: 1;"
751
+ >Item B</div>
752
+ <div
753
+ class="pf-v5-l-flex__item pf-m-spacer-md"
754
+ style="--pf-v5-l-flex--item--Order-on-md: -1;"
755
+ >Item C</div>
756
+ </div>
757
+
758
+ ```
759
+
760
+ ### Responsive ordering example
663
761
 
664
762
  ```html
665
763
  <div class="pf-v5-l-flex">
@@ -703,7 +801,13 @@ Ordering - Ordering can be applied to nested <code>.pf-v5-l-flex</code> and <cod
703
801
 
704
802
  ```
705
803
 
706
- ### List type
804
+ ### Ordering usage
805
+
806
+ | Class | Applied to | Outcome |
807
+ | -- | -- | -- |
808
+ | `--pf-v5-l-flex--item--Order{-on-[breakpoint]}: {order}` | `.pf-v5-l-flex > .pf-v5-l-flex`, `.pf-v5-l-flex__item` | Modifies the flex layout element order property. |
809
+
810
+ ## Flex layout as list
707
811
 
708
812
  ```html
709
813
  <ul class="pf-v5-l-flex">
@@ -715,14 +819,6 @@ Ordering - Ordering can be applied to nested <code>.pf-v5-l-flex</code> and <cod
715
819
 
716
820
  ```
717
821
 
718
- ### Usage
719
-
720
- | Class | Applied to | Outcome |
721
- | -- | -- | -- |
722
- | `.pf-m-justify-content-flex-end{-on-[breakpoint]}` | `.pf-v5-l-flex` | Modifies justification property and descendant spacing. |
723
- | `.pf-m-justify-content-flex-space-between{-on-[breakpoint]}` | `.pf-v5-l-flex` | Modifies justification property and descendant spacing. |
724
- | `.pf-m-justify-content-flex-start{-on-[breakpoint]}` | `.pf-v5-l-flex` | Modifies justification property and descendant spacing, used primarily to reset spacing to default. |
725
-
726
822
  ## Documentation
727
823
 
728
824
  ### Usage
@@ -768,9 +864,17 @@ Ordering - Ordering can be applied to nested <code>.pf-v5-l-flex</code> and <cod
768
864
  | `.pf-m-align-right{-on-[breakpoint]}` | `.pf-v5-l-flex > .pf-v5-l-flex`, `.pf-v5-l-flex__item` | Modifies the flex layout element margin-left property to auto. |
769
865
  | `--pf-v5-l-flex--item--Order{-on-[breakpoint]}: {order}` | `.pf-v5-l-flex > .pf-v5-l-flex`, `.pf-v5-l-flex__item` | Modifies the flex layout element order property. |
770
866
 
771
- ### Spacer system
867
+ ### Spacer system usage
868
+
869
+ | Class | Applied to | Outcome |
870
+ | -- | -- | -- |
871
+ | `.pf-m-space-items-{none, xs, sm, md, lg, xl, 2xl, 3xl, 4xl}{-on-[breakpoint]}` | `.pf-v5-l-flex` | Modifies the flex layout to add space between items on the main axis. |
872
+ | `.pf-m-spacer-{none, xs, sm, md, lg, xl, 2xl, 3xl, 4xl}{-on-[breakpoint]}` | `.pf-v5-l-flex`, `.pf-v5-l-flex > .pf-v5-l-flex__item` | Modifies the spacer for any direct child along the main axis of a flex layout. |
873
+
874
+ ### Gap spacing usage
772
875
 
773
876
  | Class | Applied to | Outcome |
774
877
  | -- | -- | -- |
775
- | `.pf-m-spacer-{none, xs, sm, md, lg, xl, 2xl}{-on-[breakpoint]}` | `.pf-v5-l-flex`, `.pf-v5-l-flex > .pf-v5-l-flex__item` | Modifies a nested flex layout or a flex item spacing. |
776
- | `.pf-m-item-space-items-{none, xs, sm, md, lg, xl, 2xl}{-on-[breakpoint]}` | `.pf-v5-l-flex` | Modifies the flex layout direct descendant spacing. |
878
+ | `.pf-m-gap{-[none, xs, sm, md, lg, xl, 2xl, 3xl, 4xl]}{-on-[breakpoint]}` | `.pf-v5-l-flex` | Modifies the space between columns and rows. |
879
+ | `.pf-m-row-gap{-[none, xs, sm, md, lg, xl, 2xl, 3xl, 4xl]}{-on-[breakpoint]}` | `.pf-v5-l-flex` | Modifies the space between rows. |
880
+ | `.pf-m-column-gap{-[none, xs, sm, md, lg, xl, 2xl, 3xl, 4xl]}{-on-[breakpoint]}` | `.pf-v5-l-flex` | Modifies the space between columns. |