Tooltip changes the width of children components #939
Replies: 11 comments
-
This is caused by the tooltip style and i'm sure is wanted. |
Beta Was this translation helpful? Give feedback.
-
Sorry, but I don't understand this behaviour as something wanted. In my case, following your comment, I am going to use |
Beta Was this translation helpful? Give feedback.
-
I agree with you that this is not the behavior I would expect. I'm sure there is a reason we have |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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.
|
Beta Was this translation helpful? Give feedback.
-
I guess i'll have to test everything then. I'll do it tomorrow and update you all on the results. |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your quick action and answer @DavideFrancescon |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
It affects me as well. Definitely the |
Beta Was this translation helpful? Give feedback.
-
I ran into the same issue and the workaround I found is customizing <Tooltip content="Tooltip content" theme={{ target: '' }}> |
Beta Was this translation helpful? Give feedback.
-
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.
Beta Was this translation helpful? Give feedback.
All reactions