1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-10-27 11:02:16 +01:00

chore: Support border collapsing for an arbitrary number of filters (#10862)

Allows using an arbitrary number of styled chips with successful border
collapsing.

Before:
<img width="682" height="126" alt="image"
src="https://github.com/user-attachments/assets/80d66a5a-e0d7-461f-9be4-4a75579a7ff2"
/>

<img width="634" height="134" alt="image"
src="https://github.com/user-attachments/assets/5d42be62-c4db-49a2-8c36-6f941f742f5f"
/>


After:
<img width="647" height="166" alt="image"
src="https://github.com/user-attachments/assets/43a2fcf8-2a56-41a3-ad84-381a6adfc947"
/>

<img width="641" height="131" alt="image"
src="https://github.com/user-attachments/assets/cb38bae1-77e0-4c8b-b12f-4e4fa8250a34"
/>
This commit is contained in:
Thomas Heartman 2025-10-24 17:18:39 +02:00 committed by GitHub
parent b6694cd925
commit 0ba7954207
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,13 +28,11 @@ export const makeStyledChip = (ariaControlTarget: string) =>
borderBottomRightRadius: theme.shape.borderRadius,
},
'&:not(&[aria-current="true"])': {
'&:not(&:first-of-type)': {
borderLeftWidth: 0,
},
'&:not(&:last-of-type)': {
borderRightWidth: 0,
},
'&:not(&[aria-current="true"], :last-of-type)': {
borderRightWidth: 0,
},
'[aria-current="true"] + &': {
borderLeftWidth: 0,
},
'& .MuiChip-label': {