1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

mat-tooltip で複数行対応するためにしたこと

Last updated at Posted at 2021-08-04

上手いことすんなりいかなかった記憶なので
備忘録として後世の自分に残しておく
参考サイト:https://www.angularjswiki.com/material/tooltip/
👆に詳細がかいてあるのでぜひ。

環境

Angular v10

備忘録

custom-tooltipを追加し改行させるように設定する。

.custom-tooltip {
  white-space: pre-line;
}

matTooltipClass="custom-tooltip"でバインドする。

」で改行してくれるようになる。

<mat-icon
  matTooltip="AAA&#13;・BBB&#13;・CCC"
  matTooltipClass="custom-tooltip"
>info
</mat-icon>

custom-tooltipにfont-sizeでフォントのサイズも変更できたのでcss周りをいじれるようになった。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?