You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TL;DR - we need to add back --pf-c-chip__c-badge--MarginLeft: var(--pf-global--spacer--xs);, and have it target the badge when it's a child of .pf-[v]-c-chip__text.
In core the badge is adjacent to .pf-[v]-c-chip__text, and in react the badge is a child of .pf-[v]-c-chip__text. Fun fact, this markup discrepancy goes back to the original implementation of a badge in the chip from 2019 via #1302 and patternfly/patternfly-react#1245
For v5, core updated the CSS to add a column-gap to the parent of the badge + text, and removed the left margin from the badge when it's a child of a chip - https://github.com/patternfly/patternfly/pull/5360/files. This broke the badges used in the react chip component.
Talking with @tlabaj we want to 1) continue supporting core and react's markup (the change outlined above should allow that), 2) add a prop to the react chip component for a count or something similar that places the badge in the chip and matches core's markup, and 3) in our next breaking change, remove this left margin we're adding back from the CSS.
The text was updated successfully, but these errors were encountered:
To fix patternfly/patternfly-react#9483
TL;DR - we need to add back
--pf-c-chip__c-badge--MarginLeft: var(--pf-global--spacer--xs);
, and have it target the badge when it's a child of.pf-[v]-c-chip__text
.In core the badge is adjacent to
.pf-[v]-c-chip__text
, and in react the badge is a child of.pf-[v]-c-chip__text
. Fun fact, this markup discrepancy goes back to the original implementation of a badge in the chip from 2019 via #1302 and patternfly/patternfly-react#1245For v5, core updated the CSS to add a
column-gap
to the parent of the badge + text, and removed the left margin from the badge when it's a child of a chip - https://github.com/patternfly/patternfly/pull/5360/files. This broke the badges used in the react chip component.Talking with @tlabaj we want to 1) continue supporting core and react's markup (the change outlined above should allow that), 2) add a prop to the react chip component for a
count
or something similar that places the badge in the chip and matches core's markup, and 3) in our next breaking change, remove this left margin we're adding back from the CSS.The text was updated successfully, but these errors were encountered: