New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chip outlined variant misaligned #13533
Comments
@izyb You are 💯 right here. We need to apply your patch to the core component. |
@oliviertassinari absolutely :) |
… for bordered chips. mui#13533
… account for horizontal misalignment. mui#13533
@oliviertassinari I also notice that the avatar circle is slightly horizontally misaligned as well: In my pull request I've added a new class to the Here is another screenshot with lowered opacity to show that it is not overlapping the border, but perfectly aligned with it: |
* add box-sizing: border-box to chip root class to prevent misalignment for bordered chips. #13533 * add 1px horizontal adjustment of chip avatar if variant='outlined' to account for horizontal misalignment. #13533 * add space in between icon prop and following prop in chip playground JSX code display to prevent markdown parser from misinterpreting the code block. #13532 * [docs] Update chip API * remove the style rule
When using
Chip
with the "outlined" variant and anAvatar
in place of an icon, the circle containing the avatar is misaligned from the main body of the chip.Default zoom
Zoomed in 400%
Expected Behavior
The avatar circle should align with the border of the chip, as shown in the demo site. The reason the demo site is fine is because the
box-sizing
property is inherited in all theChip
s, rather than being set on the components themselves:Current Behavior
Since the
box-sizing: border-box
property is not set, the placement of the avatar icon is misaligned with what was intended.Steps to Reproduce
Demo
Your Environment
Shown in the sandbox:
The text was updated successfully, but these errors were encountered: