Tooltip changes the width of children components #939
Replies: 12 comments
|
This is caused by the tooltip style and i'm sure is wanted. |
|
Sorry, but I don't understand this behaviour as something wanted. In my case, following your comment, I am going to use |
|
I agree with you that this is not the behavior I would expect. I'm sure there is a reason we have |
|
Just tested in tailwind playground. I don't know if it's caused by tailwind or it's default html behavior, but the default behavior of a div is |
|
Just if it could be useful for you: I changed in my application theme and everything that was broken after using Tooltips is working now. |
|
I guess i'll have to test everything then. I'll do it tomorrow and update you all on the results. |
@victorfunes @tulup-conner
Removing the w-fit breaks everything. It might work in some cases, but not in all of them, so I'm sure that removing it will surely break some site using the default settings.
|
|
Thank you for your quick action and answer @DavideFrancescon |
|
Thanks. I'll convert this into a discussion for the future, then. This is probably a quirk with Floating UI, which we might be able to fix by moving |
|
It affects me as well. Definitely the |
|
I ran into the same issue and the workaround I found is customizing <Tooltip content="Tooltip content" theme={{ target: '' }}> |


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Steps to reproduce
Generates this:

Without the tooltip:
Generates this:

Current behavior
Now using the tooltip component changes the width of the children elements, and it shouldn't affect the style.
Expected behavior
The style of the Tooltip children components should be exactly the same than without the Tooltip.
All reactions