-
-
Notifications
You must be signed in to change notification settings - Fork 698
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
Handle the case where tooltip is inside of an overflow:hidden container #152
Comments
I don't think it's possible with pure CSS.. Why not just remove the overflow: hidden prop from that div? |
Well, vertical screen real estate is very precious in certain cases. |
I think that's a pretty unreasonable (most likely impossible) request for pure CSS. You could choose to align all those tooltips to the left of each icon instead. |
It's not a request, but a statement; "it would be great to have solution for this". I apologize if I was unclear. Currently, I'm using Bootstrap JS tooltips, and their way around this tooltip cutting is by specifying the tooltip container, like, for instance "body", after which the tooltip is appended to the DOM, and it's absolutely positioned. Now, without JS, it is, as far as I know, impossible to: ...in order to [warning, Sci-Fi] use pseudo :hover on the icon to reveal the tooltip on a "parent-sibling" node and (maybe) pass the x,y of the icon. Think along the lines:
...with the "CSS5?" selector: So I'm just spitballing here, coming up with a syntax on the fly to illustrate my point. I don't know, just wanted to see if this would spark some ideas with the CSS crowd :) |
@tihoni This is definitely one of the biggest drawback in CSS tooltips currently and as you said, we can hope this discussion becomes a base for some new features in coming CSS :) As far as this issue is concerned, I can only think of just one way to solve this with current feature set. Fixed position elements don't clip inside overflow hidden parent. So we could have a different type of information system wherein tooltips always show in the bottom right corner of screen like http://codepen.io/chinchang/pen/vXgGoA This is something I have wanted to implement anyways as an additional feature (#46) in Hint.css. |
@chinchang That's a great idea! I whipped up a quick POC by adding .hint-fixed to the tooltip and positioning them for this demo. |
@tihoni But to show tooltips alongside elements you had to hardcode positions of tooltips which is not scalable and robust. It can break with responsiveness. |
I would be great to have a solution for this:
https://jsfiddle.net/tihoni/nnyk25sL/
Label: Enhancement
The text was updated successfully, but these errors were encountered: