-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
tool tip not support on multiline #3389
Comments
@kara Can i push the fix? |
This would be very helpful as \n, br , and CDATA options don't seem to work. |
yep, but i still dont get any response for that |
I'd really like to see that feature, too! |
Also, mdTooltip creates a leading and trailing space in the HTML (not stripped if not collapsing white-space), which would be nice to get rid of. I think a better solution would be the addition of mdTooltipClass. Then developers could have complete CSS control over their tooltips and solve this multiline issue with the |
If mdTooltipClass is added (#4601) I think the documentation should be updated to suggest |
Just FYI, #4893 just added mdTooltipClass EDIT: However, you'll need to use https://github.com/angular/material2-builds until an official release. |
This has now been released (beta.7) |
CSS "white-space: pre-line" doesn't work well due to extra line break and spaces before the message in the component template |
@shedar, I went ahead and fixed this and it's merged into angular:master now. I don't know much about their release timings so you probably still have a bit of a wait ahead of you until this fix lands for you to use. |
It's possible to use following style definition to take all '\n' into account: mat-tooltip-component > .mat-tooltip { Still it would be nice to have HTML makup inside tooltip. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
tool tip is not support on regular multiline
What is the expected behavior?
if we use the \n or the es6 string template literal(backtick ``), the break line will work
What is the current behavior?
tool tip string is not break line
What are the steps to reproduce?
put long string with /n or with back tick and see the tooltip that the words dont break lines
What is the use-case or motivation for changing an existing behavior?
Supporting multi line is very common and important
Which versions of Angular, Material, OS, browsers are affected?
2.0.0-beta.2, Latest Chrome, Windows 10
Is there anything else we should know?
One Solution for that is refactor the .mat-tooltip class, and add one more property:
.mat-tooltip {
white-space: pre-line;
}
The text was updated successfully, but these errors were encountered: