Skip to content

Commit 343d597

Browse files
authored
fix(card): make slotted styles !important (#2558)
1 parent 782c0ae commit 343d597

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
"@patternfly/elements": patch
3+
---
4+
`<pf-card>`: ensure that slotted content's layout always follows design specs

elements/pf-card/BaseCard.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ article {
1717
}
1818

1919
[part=body] ::slotted(:not([slot]):first-of-type) {
20-
margin-block-start: 0;
20+
margin-block-start: 0 !important;
2121
}
2222

2323
[part=body] ::slotted(:not([slot]):last-of-type) {
24-
margin-block-end: 0;
24+
margin-block-end: 0 !important;
2525
}
2626

2727
[part=footer] {

elements/pf-card/pf-card.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ header {
6060
}
6161

6262
header ::slotted(*) {
63-
font-family: var(--pf-c-card__title--FontFamily, var(--pf-global--FontFamily--heading--sans-serif, "RedHatDisplayUpdated", helvetica, arial, sans-serif));
64-
font-size: var(--pf-c-card__title--FontSize, var(--pf-global--FontSize--md, 1rem));
65-
font-weight: var(--pf-c-card__title--FontWeight, var(--pf-global--FontWeight--bold, 700));
66-
margin-block: 0;
63+
font-family: var(--pf-c-card__title--FontFamily, var(--pf-global--FontFamily--heading--sans-serif, "RedHatDisplayUpdated", helvetica, arial, sans-serif)) !important;
64+
font-size: var(--pf-c-card__title--FontSize, var(--pf-global--FontSize--md, 1rem)) !important;
65+
font-weight: var(--pf-c-card__title--FontWeight, var(--pf-global--FontWeight--bold, 700)) !important;
66+
margin-block: 0 !important;
6767
}
6868

6969
[part="footer"] {

0 commit comments

Comments
 (0)