How to change font size of tooltip?


Topic: How to change font size of tooltip?

pawled pro premium priority asked 2 years ago

Now text inside tooltip is normal size. I want to make it smaller. Simply.


Grzegorz Bujański staff answered 2 years ago

Try to set up custom class for the popup and add styles:

<p>
  Hover the link to see the
  <a href="#" data-mdb-toggle="tooltip" data-mdb-custom-class="text-sm" title="Hi! I'm tooltip">tooltip</a>
</p>

.text-sm .tooltip-inner {
  font-size: 0.5rem;
}

pawled pro premium priority commented 2 years ago

Is it impossible to assign different size to "original" tooltip?


Grzegorz Bujański staff commented 2 years ago

What do you mean by "original" tolltip?


pawled pro premium priority commented 2 years ago

Editing inside the scss file and new build.


Grzegorz Bujański staff commented 2 years ago

You can change the variable $ tooltip-inner-font-size and assign it a new value. You will find this variable in src/mdb/scss/free/_variables.scss. Remember that this will change the text size of all tooltips.


pawled pro premium priority answered a year ago

Tooltip after few appearances stops to appear. Is it a bug? I use Chrome.


Wojstan staff answered a year ago

Thanks for Your report. We will fix this as soon as possible.


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: 3.0.0
  • Device: Any
  • Browser: Any
  • OS: Any
  • Provided sample code: No
  • Provided link: No