Skip to content
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

[Bug Report][3.6.6] VChip has different width for 'flat' and 'outlined' variants #19836

Open
frederikheld opened this issue May 19, 2024 · 3 comments

Comments

@frederikheld
Copy link
Contributor

frederikheld commented May 19, 2024

Environment

Vuetify Version: 3.6.6
Vue Version: 3.4.27
Browsers: Firefox 126.0
OS: Ubuntu undefined

Steps to reproduce

In my case: use the v-chip as toggle-item that shows the two states as flat and outlined variants. You will see how the width changes which can sometimes unexpectedly wrap the line if multiple chips are displayed inline.

Expected Behavior

Chip should have same width regardless of variant.

Actual Behavior

Chip changes width depending on variant

Reproduction Link

https://play.vuetifyjs.com/#...

@frederikheld
Copy link
Contributor Author

frederikheld commented May 19, 2024

I was able to "fix" this by conditionally adding a span around the v-chip text that has a margin left and right of 0.085em each. But I don't know if this is the right unit to keep it consistent and if this solution would work in other contexts as well.

@mirocklez
Copy link

The same applies for the button, as well - the outlined variant increases the width by 2px.

@frederikheld
Copy link
Contributor Author

Okay, well. It's just too obvious that the border would be a pixel value XD I replaced 0.085em with 1px on each side and can confirm the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants