@patternfly/patternfly 4.197.1 → 4.198.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.
- package/components/Card/card.css +12 -0
- package/components/Card/card.scss +14 -0
- package/docs/components/Card/examples/Card.md +22 -0
- package/package.json +1 -1
- package/patternfly-no-reset.css +12 -0
- package/patternfly.css +12 -0
- package/patternfly.min.css +1 -1
- package/patternfly.min.css.map +1 -1
package/components/Card/card.css
CHANGED
|
@@ -84,6 +84,8 @@
|
|
|
84
84
|
--pf-c-card__header--m-toggle-right--toggle--MarginRight: calc(var(--pf-global--spacer--form-element) * -1);
|
|
85
85
|
--pf-c-card__header--m-toggle-right--toggle--MarginLeft: var(--pf-global--spacer--xs);
|
|
86
86
|
--pf-c-card__header--m-toggle-right--actions--MarginRight: 0;
|
|
87
|
+
--pf-c-card__input--focus--BorderWidth: var(--pf-global--BorderWidth--md);
|
|
88
|
+
--pf-c-card__input--focus--BorderColor: var(--pf-global--primary-color--100);
|
|
87
89
|
display: flex;
|
|
88
90
|
flex-direction: column;
|
|
89
91
|
background-color: var(--pf-c-card--BackgroundColor);
|
|
@@ -310,6 +312,16 @@
|
|
|
310
312
|
font-size: var(--pf-c-card__footer--FontSize);
|
|
311
313
|
}
|
|
312
314
|
|
|
315
|
+
.pf-c-card__sr-input:focus + .pf-c-card::after {
|
|
316
|
+
position: absolute;
|
|
317
|
+
top: 0;
|
|
318
|
+
right: 0;
|
|
319
|
+
bottom: 0;
|
|
320
|
+
left: 0;
|
|
321
|
+
content: "";
|
|
322
|
+
border: var(--pf-c-card__input--focus--BorderWidth) solid var(--pf-c-card__input--focus--BorderColor);
|
|
323
|
+
}
|
|
324
|
+
|
|
313
325
|
.pf-m-overpass-font .pf-c-card .pf-c-card__title {
|
|
314
326
|
font-weight: var(--pf-global--FontWeight--normal);
|
|
315
327
|
}
|
|
@@ -105,6 +105,10 @@
|
|
|
105
105
|
--pf-c-card__header--m-toggle-right--toggle--MarginLeft: var(--pf-global--spacer--xs);
|
|
106
106
|
--pf-c-card__header--m-toggle-right--actions--MarginRight: 0;
|
|
107
107
|
|
|
108
|
+
// Card input
|
|
109
|
+
--pf-c-card__input--focus--BorderWidth: var(--pf-global--BorderWidth--md);
|
|
110
|
+
--pf-c-card__input--focus--BorderColor: var(--pf-global--primary-color--100);
|
|
111
|
+
|
|
108
112
|
display: flex;
|
|
109
113
|
flex-direction: column;
|
|
110
114
|
background-color: var(--pf-c-card--BackgroundColor);
|
|
@@ -380,6 +384,16 @@
|
|
|
380
384
|
font-size: var(--pf-c-card__footer--FontSize);
|
|
381
385
|
}
|
|
382
386
|
|
|
387
|
+
.pf-c-card__sr-input:focus + .pf-c-card::after {
|
|
388
|
+
position: absolute;
|
|
389
|
+
top: 0;
|
|
390
|
+
right: 0;
|
|
391
|
+
bottom: 0;
|
|
392
|
+
left: 0;
|
|
393
|
+
content: "";
|
|
394
|
+
border: var(--pf-c-card__input--focus--BorderWidth) solid var(--pf-c-card__input--focus--BorderColor);
|
|
395
|
+
}
|
|
396
|
+
|
|
383
397
|
// RedHat Font overrides
|
|
384
398
|
@include pf-m-overpass-font {
|
|
385
399
|
.pf-c-card .pf-c-card__title {
|
|
@@ -375,6 +375,27 @@ cssPrefix: pf-c-card
|
|
|
375
375
|
|
|
376
376
|
```
|
|
377
377
|
|
|
378
|
+
### Selectable with a hidden input for improved screen reader accessibility
|
|
379
|
+
|
|
380
|
+
```html
|
|
381
|
+
<input
|
|
382
|
+
class="pf-c-card__sr-input pf-screen-reader"
|
|
383
|
+
type="checkbox"
|
|
384
|
+
tabindex="-1"
|
|
385
|
+
aria-label="Checkbox to improve screen reader accessibility of a selectable card"
|
|
386
|
+
/>
|
|
387
|
+
<div
|
|
388
|
+
class="pf-c-card pf-m-selectable-raised"
|
|
389
|
+
tabindex="0"
|
|
390
|
+
id="card-selectable-with-input-example"
|
|
391
|
+
>
|
|
392
|
+
<div class="pf-c-card__title">Title</div>
|
|
393
|
+
<div class="pf-c-card__body">Body</div>
|
|
394
|
+
<div class="pf-c-card__footer">Footer</div>
|
|
395
|
+
</div>
|
|
396
|
+
|
|
397
|
+
```
|
|
398
|
+
|
|
378
399
|
### Non selectable
|
|
379
400
|
|
|
380
401
|
```html
|
|
@@ -886,6 +907,7 @@ A card is a generic rectangular container that can be used to build other compon
|
|
|
886
907
|
| `.pf-c-card__actions` | `<div>` | Creates an actions element to be used in the card header. |
|
|
887
908
|
| `.pf-c-card__header-main` | `<div>` | Creates a wrapper element to be used in the card header when using an image, logo, or text. |
|
|
888
909
|
| `.pf-c-card__expandable-content` | `<div>` | Creates the expandable card's expandable content. |
|
|
910
|
+
| `.pf-c-card__sr-input` | `<input>` | Creates an input which, when focused, makes a following `.pf-c-card` appear focused. |
|
|
889
911
|
| `.pf-m-compact` | `.pf-c-card` | Creates a compact variation of the card component that involves smaller font sizes and spacing. This variation is for use on dashboards and where a smaller card is preferred. |
|
|
890
912
|
| `.pf-m-display-lg` | `.pf-c-card` | Creates a large variation of the card component that involves larger font sizes and spacing. This variation is for marketing use cases. |
|
|
891
913
|
| `.pf-m-no-fill` | `.pf-c-card__body` | Sets a `.pf-c-card__body` to not fill the available space in `.pf-c-card`. `.pf-m-no-fill` can be added to multiple card bodies. |
|
package/package.json
CHANGED
package/patternfly-no-reset.css
CHANGED
|
@@ -8173,6 +8173,8 @@ button.pf-c-breadcrumb__link {
|
|
|
8173
8173
|
--pf-c-card__header--m-toggle-right--toggle--MarginRight: calc(var(--pf-global--spacer--form-element) * -1);
|
|
8174
8174
|
--pf-c-card__header--m-toggle-right--toggle--MarginLeft: var(--pf-global--spacer--xs);
|
|
8175
8175
|
--pf-c-card__header--m-toggle-right--actions--MarginRight: 0;
|
|
8176
|
+
--pf-c-card__input--focus--BorderWidth: var(--pf-global--BorderWidth--md);
|
|
8177
|
+
--pf-c-card__input--focus--BorderColor: var(--pf-global--primary-color--100);
|
|
8176
8178
|
display: flex;
|
|
8177
8179
|
flex-direction: column;
|
|
8178
8180
|
background-color: var(--pf-c-card--BackgroundColor);
|
|
@@ -8399,6 +8401,16 @@ button.pf-c-breadcrumb__link {
|
|
|
8399
8401
|
font-size: var(--pf-c-card__footer--FontSize);
|
|
8400
8402
|
}
|
|
8401
8403
|
|
|
8404
|
+
.pf-c-card__sr-input:focus + .pf-c-card::after {
|
|
8405
|
+
position: absolute;
|
|
8406
|
+
top: 0;
|
|
8407
|
+
right: 0;
|
|
8408
|
+
bottom: 0;
|
|
8409
|
+
left: 0;
|
|
8410
|
+
content: "";
|
|
8411
|
+
border: var(--pf-c-card__input--focus--BorderWidth) solid var(--pf-c-card__input--focus--BorderColor);
|
|
8412
|
+
}
|
|
8413
|
+
|
|
8402
8414
|
.pf-m-overpass-font .pf-c-card .pf-c-card__title {
|
|
8403
8415
|
font-weight: var(--pf-global--FontWeight--normal);
|
|
8404
8416
|
}
|
package/patternfly.css
CHANGED
|
@@ -8300,6 +8300,8 @@ button.pf-c-breadcrumb__link {
|
|
|
8300
8300
|
--pf-c-card__header--m-toggle-right--toggle--MarginRight: calc(var(--pf-global--spacer--form-element) * -1);
|
|
8301
8301
|
--pf-c-card__header--m-toggle-right--toggle--MarginLeft: var(--pf-global--spacer--xs);
|
|
8302
8302
|
--pf-c-card__header--m-toggle-right--actions--MarginRight: 0;
|
|
8303
|
+
--pf-c-card__input--focus--BorderWidth: var(--pf-global--BorderWidth--md);
|
|
8304
|
+
--pf-c-card__input--focus--BorderColor: var(--pf-global--primary-color--100);
|
|
8303
8305
|
display: flex;
|
|
8304
8306
|
flex-direction: column;
|
|
8305
8307
|
background-color: var(--pf-c-card--BackgroundColor);
|
|
@@ -8526,6 +8528,16 @@ button.pf-c-breadcrumb__link {
|
|
|
8526
8528
|
font-size: var(--pf-c-card__footer--FontSize);
|
|
8527
8529
|
}
|
|
8528
8530
|
|
|
8531
|
+
.pf-c-card__sr-input:focus + .pf-c-card::after {
|
|
8532
|
+
position: absolute;
|
|
8533
|
+
top: 0;
|
|
8534
|
+
right: 0;
|
|
8535
|
+
bottom: 0;
|
|
8536
|
+
left: 0;
|
|
8537
|
+
content: "";
|
|
8538
|
+
border: var(--pf-c-card__input--focus--BorderWidth) solid var(--pf-c-card__input--focus--BorderColor);
|
|
8539
|
+
}
|
|
8540
|
+
|
|
8529
8541
|
.pf-m-overpass-font .pf-c-card .pf-c-card__title {
|
|
8530
8542
|
font-weight: var(--pf-global--FontWeight--normal);
|
|
8531
8543
|
}
|