@patternfly/patternfly 4.185.2 → 4.187.0

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.
@@ -87,6 +87,11 @@
87
87
  text-align: left;
88
88
  }
89
89
 
90
+ code,
91
+ pre {
92
+ font-family: var(--pf-global--FontFamily--monospace);
93
+ }
94
+
90
95
  // Patternfly base styles
91
96
 
92
97
  *,
@@ -81,6 +81,11 @@ th {
81
81
  text-align: left;
82
82
  }
83
83
 
84
+ code,
85
+ pre {
86
+ font-family: var(--pf-global--FontFamily--monospace);
87
+ }
88
+
84
89
  *,
85
90
  *::before,
86
91
  *::after {
@@ -51,6 +51,7 @@
51
51
  --pf-c-card--m-selectable-raised--m-selected-raised--TranslateY: var(--pf-c-card--m-selectable-raised--m-selected-raised--TranslateY--base);
52
52
  --pf-c-card--m-flat--m-selectable-raised--m-selected-raised--TranslateY: calc(var(--pf-c-card--m-selectable-raised--m-selected-raised--TranslateY--base) + var(--pf-c-card--m-flat--BorderWidth));
53
53
  --pf-c-card--m-rounded--m-selectable-raised--m-selected-raised--TranslateY: calc(var(--pf-c-card--m-selectable-raised--m-selected-raised--TranslateY--base) + var(--pf-c-card--m-rounded--BorderRadius));
54
+ --pf-c-card--m-selectable-raised--m-selected-raised--ZIndex: var(--pf-global--ZIndex--xs);
54
55
  --pf-c-card--m-selectable-raised--m-selected-raised--Transition: transform .25s linear, box-shadow .25s linear;
55
56
  --pf-c-card--m-selectable-raised--m-selected-raised--before--Transition: transform .25s linear;
56
57
  --pf-c-card--m-selectable-raised--m-selected-raised--before--TranslateY: calc(var(--pf-c-card--m-selectable-raised--m-selected-raised--TranslateY) * -1);
@@ -155,6 +156,7 @@
155
156
  --pf-c-card--m-selectable-raised--before--Transition: var(--pf-c-card--m-selectable-raised--m-selected-raised--before--Transition);
156
157
  --pf-c-card--m-selectable-raised--before--TranslateY: var(--pf-c-card--m-selectable-raised--m-selected-raised--before--TranslateY);
157
158
  --pf-c-card--m-selectable-raised--before--ScaleY: var(--pf-c-card--m-selectable-raised--m-selected-raised--before--ScaleY);
159
+ z-index: var(--pf-c-card--m-selectable-raised--m-selected-raised--ZIndex);
158
160
  box-shadow: var(--pf-c-card--m-selectable-raised--m-selected-raised--BoxShadow);
159
161
  transition: var(--pf-c-card--m-selectable-raised--m-selected-raised--Transition);
160
162
  transform: translateY(var(--pf-c-card--m-selectable-raised--m-selected-raised--TranslateY));
@@ -57,6 +57,7 @@
57
57
  --pf-c-card--m-selectable-raised--m-selected-raised--TranslateY: var(--pf-c-card--m-selectable-raised--m-selected-raised--TranslateY--base);
58
58
  --pf-c-card--m-flat--m-selectable-raised--m-selected-raised--TranslateY: calc(var(--pf-c-card--m-selectable-raised--m-selected-raised--TranslateY--base) + var(--pf-c-card--m-flat--BorderWidth));
59
59
  --pf-c-card--m-rounded--m-selectable-raised--m-selected-raised--TranslateY: calc(var(--pf-c-card--m-selectable-raised--m-selected-raised--TranslateY--base) + var(--pf-c-card--m-rounded--BorderRadius));
60
+ --pf-c-card--m-selectable-raised--m-selected-raised--ZIndex: var(--pf-global--ZIndex--xs);
60
61
  --pf-c-card--m-selectable-raised--m-selected-raised--Transition: transform .25s linear, box-shadow .25s linear;
61
62
  --pf-c-card--m-selectable-raised--m-selected-raised--before--Transition: transform .25s linear;
62
63
  --pf-c-card--m-selectable-raised--m-selected-raised--before--TranslateY: calc(var(--pf-c-card--m-selectable-raised--m-selected-raised--TranslateY) * -1);
@@ -196,6 +197,7 @@
196
197
  --pf-c-card--m-selectable-raised--before--TranslateY: var(--pf-c-card--m-selectable-raised--m-selected-raised--before--TranslateY); // moves before down when selected - same amount and speed as the selected card moves up
197
198
  --pf-c-card--m-selectable-raised--before--ScaleY: var(--pf-c-card--m-selectable-raised--m-selected-raised--before--ScaleY); // causes the before to grow in height - more performant than transitioning height
198
199
 
200
+ z-index: var(--pf-c-card--m-selectable-raised--m-selected-raised--ZIndex); // allows elements (ie, dropdowns) from this card to appear on other cards since the transform creates a new stacking context
199
201
  box-shadow: var(--pf-c-card--m-selectable-raised--m-selected-raised--BoxShadow);
200
202
  transition: var(--pf-c-card--m-selectable-raised--m-selected-raised--Transition);
201
203
  transform: translateY(var(--pf-c-card--m-selectable-raised--m-selected-raised--TranslateY)); // moves card up when selected
@@ -4,7 +4,7 @@
4
4
  --pf-c-form--m-horizontal__group-label--md--GridColumnWidth: 9.375rem;
5
5
  --pf-c-form--m-horizontal__group-label--md--GridColumnGap: var(--pf-global--spacer--md);
6
6
  --pf-c-form--m-horizontal__group-control--md--GridColumnWidth: 1fr;
7
- --pf-c-form--m-limit-width--MaxWidth: 31.25rem;
7
+ --pf-c-form--m-limit-width--MaxWidth: 55rem;
8
8
  --pf-c-form--m-horizontal__group-label--md--PaddingTop: calc((((((var(--pf-global--FontSize--md) * var(--pf-global--LineHeight--md)) + (2 * var(--pf-global--BorderWidth--sm))) - var(--pf-global--FontSize--md)) / 2) + var(--pf-global--FontSize--md)) - ((((var(--pf-global--FontSize--sm) * var(--pf-global--LineHeight--sm)) - var(--pf-global--FontSize--sm)) / 2) + var(--pf-global--FontSize--sm)) + var(--pf-global--BorderWidth--sm));
9
9
  --pf-c-form__group-label--PaddingBottom: var(--pf-global--spacer--sm);
10
10
  --pf-c-form--m-horizontal__group-label--m-no-padding--md--PaddingTop: 0;
@@ -33,7 +33,7 @@ $pf-c-form--m-horizontal--breakpoint-map: build-breakpoint-map("sm", "md", "lg",
33
33
  --pf-c-form--m-horizontal__group-control--md--GridColumnWidth: 1fr;
34
34
 
35
35
  // limit width
36
- --pf-c-form--m-limit-width--MaxWidth: #{pf-size-prem(500px)};
36
+ --pf-c-form--m-limit-width--MaxWidth: #{pf-size-prem(880px)};
37
37
 
38
38
  // Group label
39
39
 
@@ -33,6 +33,7 @@
33
33
  --pf-c-form-control--m-expanded--PaddingBottom: calc(var(--pf-global--spacer--form-element) - var(--pf-c-form-control--focus--BorderBottomWidth));
34
34
  --pf-c-form-control--m-expanded--BorderBottomColor: var(--pf-global--primary-color--100);
35
35
  --pf-c-form-control--placeholder--Color: var(--pf-global--Color--dark-200);
36
+ --pf-c-form-control--placeholder--child--Color: var(--pf-global--Color--100);
36
37
  --pf-c-form-control--disabled--Color: var(--pf-global--disabled-color--100);
37
38
  --pf-c-form-control--disabled--BackgroundColor: var(--pf-global--disabled-color--300);
38
39
  --pf-c-form-control--disabled--BorderColor: transparent;
@@ -293,6 +294,12 @@ select.pf-c-form-control.pf-m-warning {
293
294
  select.pf-c-form-control.pf-m-placeholder {
294
295
  color: var(--pf-c-form-control--placeholder--Color);
295
296
  }
297
+ select.pf-c-form-control.pf-m-placeholder * {
298
+ color: var(--pf-c-form-control--placeholder--child--Color);
299
+ }
300
+ select.pf-c-form-control.pf-m-placeholder *:disabled {
301
+ color: revert;
302
+ }
296
303
 
297
304
  textarea.pf-c-form-control {
298
305
  --pf-c-form-control--success--BackgroundPositionY: var(--pf-c-form-control--textarea--success--BackgroundPositionY);
@@ -62,6 +62,7 @@ $pf-c-form-control--m-clock--Coordinates: "M256 8C119 8 8 119 8 256s111 248 248
62
62
 
63
63
  // input placeholder style
64
64
  --pf-c-form-control--placeholder--Color: var(--pf-global--Color--dark-200);
65
+ --pf-c-form-control--placeholder--child--Color: var(--pf-global--Color--100);
65
66
 
66
67
  // input disabled style
67
68
  --pf-c-form-control--disabled--Color: var(--pf-global--disabled-color--100);
@@ -407,6 +408,16 @@ $pf-c-form-control--m-clock--Coordinates: "M256 8C119 8 8 119 8 256s111 248 248
407
408
 
408
409
  &.pf-m-placeholder {
409
410
  color: var(--pf-c-form-control--placeholder--Color);
411
+
412
+ * {
413
+ color: var(--pf-c-form-control--placeholder--child--Color);
414
+
415
+ // stylelint-disable max-nesting-depth
416
+ &:disabled {
417
+ color: revert;
418
+ }
419
+ // stylelint-enable
420
+ }
410
421
  }
411
422
  }
412
423
 
@@ -1,5 +1,6 @@
1
1
  @mixin page() {
2
2
  .pf-c-page {
3
+ --pf-c-page__main-section--BackgroundColor: var(--pf-global--BackgroundColor--200);
3
4
  --pf-c-page__header-tools--c-button--m-selected--before--BackgroundColor: var(--pf-global--BackgroundColor--300);
4
5
  --pf-c-page__sidebar--BackgroundColor: var(--pf-global--BackgroundColor--100);
5
6
  --pf-c-page__header--BackgroundColor: var(--pf-global--palette--black-1000);
@@ -13,13 +13,13 @@
13
13
  --pf-c-switch__input--checked__label--Color: var(--pf-global--Color--dark-100);
14
14
  --pf-c-switch__input--not-checked__label--Color: var(--pf-global--disabled-color--100);
15
15
  --pf-c-switch__input--disabled__label--Color: var(--pf-global--disabled-color--100);
16
- --pf-c-switch__input--disabled__toggle--BackgroundColor: var(--pf-global--Color--dark-200);
17
- --pf-c-switch__input--disabled__toggle--before--BackgroundColor: var(--pf-global--disabled-color--200);
16
+ --pf-c-switch__input--disabled__toggle--BackgroundColor: var(--pf-global--disabled-color--200);
17
+ --pf-c-switch__input--disabled__toggle--before--BackgroundColor: var(--pf-global--palette--black-150);
18
18
  --pf-c-switch__input--focus__toggle--OutlineWidth: var(--pf-global--BorderWidth--md);
19
19
  --pf-c-switch__input--focus__toggle--OutlineOffset: var(--pf-global--spacer--sm);
20
20
  --pf-c-switch__input--focus__toggle--OutlineColor: var(--pf-global--primary-color--100);
21
21
  --pf-c-switch__toggle--Height: calc(var(--pf-c-switch--FontSize) * var(--pf-c-switch--LineHeight));
22
- --pf-c-switch__toggle--BackgroundColor: var(--pf-global--disabled-color--200);
22
+ --pf-c-switch__toggle--BackgroundColor: var(--pf-global--palette--black-500);
23
23
  --pf-c-switch__toggle--BorderRadius: var(--pf-c-switch__toggle--Height);
24
24
  --pf-c-switch__toggle--before--Width: calc(var(--pf-c-switch--FontSize) - var(--pf-c-switch__toggle-icon--Offset));
25
25
  --pf-c-switch__toggle--before--Height: var(--pf-c-switch__toggle--before--Width);
@@ -20,15 +20,15 @@
20
20
  --pf-c-switch__input--checked__label--Color: var(--pf-global--Color--dark-100);
21
21
  --pf-c-switch__input--not-checked__label--Color: var(--pf-global--disabled-color--100);
22
22
  --pf-c-switch__input--disabled__label--Color: var(--pf-global--disabled-color--100);
23
- --pf-c-switch__input--disabled__toggle--BackgroundColor: var(--pf-global--Color--dark-200);
24
- --pf-c-switch__input--disabled__toggle--before--BackgroundColor: var(--pf-global--disabled-color--200);
23
+ --pf-c-switch__input--disabled__toggle--BackgroundColor: var(--pf-global--disabled-color--200);
24
+ --pf-c-switch__input--disabled__toggle--before--BackgroundColor: var(--pf-global--palette--black-150);
25
25
  --pf-c-switch__input--focus__toggle--OutlineWidth: var(--pf-global--BorderWidth--md);
26
26
  --pf-c-switch__input--focus__toggle--OutlineOffset: var(--pf-global--spacer--sm);
27
27
  --pf-c-switch__input--focus__toggle--OutlineColor: var(--pf-global--primary-color--100);
28
28
 
29
29
  // Switch toggle
30
30
  --pf-c-switch__toggle--Height: calc(var(--pf-c-switch--FontSize) * var(--pf-c-switch--LineHeight));
31
- --pf-c-switch__toggle--BackgroundColor: var(--pf-global--disabled-color--200);
31
+ --pf-c-switch__toggle--BackgroundColor: var(--pf-global--palette--black-500);
32
32
  --pf-c-switch__toggle--BorderRadius: var(--pf-c-switch__toggle--Height);
33
33
  --pf-c-switch__toggle--before--Width: calc(var(--pf-c-switch--FontSize) - var(--pf-c-switch__toggle-icon--Offset));
34
34
  --pf-c-switch__toggle--before--Height: var(--pf-c-switch__toggle--before--Width);
@@ -154,6 +154,10 @@
154
154
  --pf-c-tabs--before--BorderBottomWidth: 0;
155
155
  --pf-c-tabs__link--disabled--before--BorderBottomWidth: 0;
156
156
  }
157
+ .pf-c-tabs.pf-m-border-bottom {
158
+ --pf-c-tabs--before--BorderBottomWidth: var(--pf-c-tabs--before--border-width--base);
159
+ --pf-c-tabs__link--disabled--before--BorderBottomWidth: var(--pf-c-tabs--before--border-width--base);
160
+ }
157
161
  .pf-c-tabs.pf-m-box .pf-c-tabs__link, .pf-c-tabs.pf-m-vertical .pf-c-tabs__link {
158
162
  --pf-c-tabs__link--after--BorderBottomWidth: 0;
159
163
  }
@@ -199,6 +199,11 @@ $pf-c-tabs--spacer-map: build-spacer-map("none", "sm", "md", "lg", "xl", "2xl");
199
199
  --pf-c-tabs__link--disabled--before--BorderBottomWidth: 0;
200
200
  }
201
201
 
202
+ &.pf-m-border-bottom {
203
+ --pf-c-tabs--before--BorderBottomWidth: var(--pf-c-tabs--before--border-width--base);
204
+ --pf-c-tabs__link--disabled--before--BorderBottomWidth: var(--pf-c-tabs--before--border-width--base);
205
+ }
206
+
202
207
  // Remove bottom border for variants
203
208
  &.pf-m-box,
204
209
  &.pf-m-vertical {
@@ -124,6 +124,22 @@ cssPrefix: pf-c-form-control
124
124
  id="select-standard"
125
125
  name="select-standard"
126
126
  aria-label="Standard select example"
127
+ >
128
+ <option value selected disabled>Please choose</option>
129
+ <option value="Mr">Mr</option>
130
+ <option value="Miss">Miss</option>
131
+ <option value="Mrs">Mrs</option>
132
+ <option value="Ms">Ms</option>
133
+ <option value="Dr">Dr</option>
134
+ <option value="Other">Other</option>
135
+ </select>
136
+ <br />
137
+ <br />
138
+ <select
139
+ class="pf-c-form-control pf-m-placeholder"
140
+ id="select-placeholder-enabled"
141
+ name="select-placeholder-enabled"
142
+ aria-label="Placeholder enabled select example"
127
143
  >
128
144
  <option value selected>Please choose</option>
129
145
  <option value="Mr">Mr</option>
@@ -13,7 +13,6 @@ cssPrefix: pf-c-switch
13
13
  type="checkbox"
14
14
  id="switch-with-label-1"
15
15
  aria-labelledby="switch-with-label-1-on"
16
- name="switchExample1"
17
16
  checked
18
17
  />
19
18
 
@@ -40,9 +39,7 @@ cssPrefix: pf-c-switch
40
39
  type="checkbox"
41
40
  id="switch-with-label-2"
42
41
  aria-labelledby="switch-with-label-2-on"
43
- name="switchExample2"
44
42
  />
45
-
46
43
  <span class="pf-c-switch__toggle"></span>
47
44
 
48
45
  <span
@@ -69,7 +66,6 @@ cssPrefix: pf-c-switch
69
66
  type="checkbox"
70
67
  id="switch-reverse-1"
71
68
  aria-labelledby="switch-reverse-1-on"
72
- name="switchExample1"
73
69
  checked
74
70
  />
75
71
 
@@ -96,9 +92,7 @@ cssPrefix: pf-c-switch
96
92
  type="checkbox"
97
93
  id="switch-reverse-2"
98
94
  aria-labelledby="switch-reverse-2-on"
99
- name="switchExample2"
100
95
  />
101
-
102
96
  <span class="pf-c-switch__toggle"></span>
103
97
 
104
98
  <span
@@ -116,6 +110,66 @@ cssPrefix: pf-c-switch
116
110
 
117
111
  ```
118
112
 
113
+ ### Label and check
114
+
115
+ ```html
116
+ <label class="pf-c-switch" for="switch-label-check-1">
117
+ <input
118
+ class="pf-c-switch__input"
119
+ type="checkbox"
120
+ id="switch-label-check-1"
121
+ aria-labelledby="switch-label-check-1-on"
122
+ checked
123
+ />
124
+
125
+ <span class="pf-c-switch__toggle">
126
+ <span class="pf-c-switch__toggle-icon">
127
+ <i class="fas fa-check" aria-hidden="true"></i>
128
+ </span>
129
+ </span>
130
+ <span
131
+ class="pf-c-switch__label pf-m-on"
132
+ id="switch-label-check-1-on"
133
+ aria-hidden="true"
134
+ >Message when on</span>
135
+
136
+ <span
137
+ class="pf-c-switch__label pf-m-off"
138
+ id="switch-label-check-1-off"
139
+ aria-hidden="true"
140
+ >Message when off</span>
141
+ </label>
142
+
143
+ <br />
144
+ <br />
145
+ <label class="pf-c-switch" for="switch-label-check-2">
146
+ <input
147
+ class="pf-c-switch__input"
148
+ type="checkbox"
149
+ id="switch-label-check-2"
150
+ aria-labelledby="switch-label-check-2-off"
151
+ />
152
+
153
+ <span class="pf-c-switch__toggle">
154
+ <span class="pf-c-switch__toggle-icon">
155
+ <i class="fas fa-check" aria-hidden="true"></i>
156
+ </span>
157
+ </span>
158
+ <span
159
+ class="pf-c-switch__label pf-m-on"
160
+ id="switch-label-check-2-on"
161
+ aria-hidden="true"
162
+ >Message when on</span>
163
+
164
+ <span
165
+ class="pf-c-switch__label pf-m-off"
166
+ id="switch-label-check-2-off"
167
+ aria-hidden="true"
168
+ >Message when off</span>
169
+ </label>
170
+
171
+ ```
172
+
119
173
  ### Without label
120
174
 
121
175
  ```html
@@ -125,7 +179,6 @@ cssPrefix: pf-c-switch
125
179
  type="checkbox"
126
180
  id="switch-with-icon-1"
127
181
  aria-label="switch is off"
128
- name="switchExample3"
129
182
  checked
130
183
  />
131
184
 
@@ -144,9 +197,7 @@ cssPrefix: pf-c-switch
144
197
  type="checkbox"
145
198
  id="switch-with-icon-2"
146
199
  aria-label="switch is off"
147
- name="switchExample4"
148
200
  />
149
-
150
201
  <span class="pf-c-switch__toggle">
151
202
  <span class="pf-c-switch__toggle-icon">
152
203
  <i class="fas fa-check" aria-hidden="true"></i>
@@ -165,7 +216,6 @@ cssPrefix: pf-c-switch
165
216
  type="checkbox"
166
217
  id="switch-disabled-1"
167
218
  aria-labelledby="switch-disabled-1-on"
168
- name="switchExample5"
169
219
  disabled
170
220
  checked
171
221
  />
@@ -193,7 +243,6 @@ cssPrefix: pf-c-switch
193
243
  type="checkbox"
194
244
  id="switch-disabled-2"
195
245
  aria-labelledby="switch-disabled-2-on"
196
- name="switchExample6"
197
246
  disabled
198
247
  />
199
248
 
@@ -43,40 +43,35 @@ cssPrefix: pf-c-tab-content
43
43
  ### Padding
44
44
 
45
45
  ```html
46
- <section
47
- class="pf-c-tab-content pf-m-padding"
48
- id="tab1-panel"
49
- role="tabpanel"
50
- tabindex="0"
51
- >
52
- <div class="pf-c-tab-content__body">Panel 1</div>
46
+ <section class="pf-c-tab-content" id="tab1-panel" role="tabpanel" tabindex="0">
47
+ <div class="pf-c-tab-content__body pf-m-padding">Panel 1</div>
53
48
  </section>
54
49
  <section
55
- class="pf-c-tab-content pf-m-padding"
50
+ class="pf-c-tab-content"
56
51
  id="tab2-panel"
57
52
  role="tabpanel"
58
53
  tabindex="0"
59
54
  hidden
60
55
  >
61
- <div class="pf-c-tab-content__body">Panel 2</div>
56
+ <div class="pf-c-tab-content__body pf-m-padding">Panel 2</div>
62
57
  </section>
63
58
  <section
64
- class="pf-c-tab-content pf-m-padding"
59
+ class="pf-c-tab-content"
65
60
  id="tab3-panel"
66
61
  role="tabpanel"
67
62
  tabindex="0"
68
63
  hidden
69
64
  >
70
- <div class="pf-c-tab-content__body">Panel 3</div>
65
+ <div class="pf-c-tab-content__body pf-m-padding">Panel 3</div>
71
66
  </section>
72
67
  <section
73
- class="pf-c-tab-content pf-m-padding"
68
+ class="pf-c-tab-content"
74
69
  id="tab4-panel"
75
70
  role="tabpanel"
76
71
  tabindex="0"
77
72
  hidden
78
73
  >
79
- <div class="pf-c-tab-content__body">Panel 4</div>
74
+ <div class="pf-c-tab-content__body pf-m-padding">Panel 4</div>
80
75
  </section>
81
76
 
82
77
  ```
@@ -1910,6 +1910,7 @@ Whenever a list of tabs is unique on the current page, it can be used in a `<nav
1910
1910
  | `.pf-c-tabs__toggle-text` | `<span>` | Initiates a tabs expandable toggle text. |
1911
1911
  | `.pf-m-secondary` | `.pf-c-tabs` | Applies secondary styling to the tab component. |
1912
1912
  | `.pf-m-no-border-bottom` | `.pf-c-tabs` | Removes bottom border from a tab component. |
1913
+ | `.pf-m-border-bottom` | `.pf-c-tabs` | Adds a bottom border to secondary tabs. |
1913
1914
  | `.pf-m-box` | `.pf-c-tabs` | Applies box styling to the tab component. |
1914
1915
  | `.pf-m-vertical` | `.pf-c-tabs` | Applies vertical styling to the tab component. |
1915
1916
  | `.pf-m-fill` | `.pf-c-tabs` | Modifies the tabs to fill the available space. |