No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    q-tooltip background color

    Framework
    2
    2
    2457
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      javierabadia last edited by

      Hi,

      (working with v0.13.4)

      Is there a way to style q-tooltips? I’d like to change the background color and font-size

      <q-tooltip class=“bg-primary”>
      my tooltip text here
      </q-tooltip>

      doesn’t work, because the span.q-tooltip element doesn’t get the ‘bg-primary’ class once inserted as a child of the <body>

      Thanks!

      1 Reply Last reply Reply Quote 0
      • a47ae
        a47ae last edited by

        The global tooltip background color can be set via the $tooltip-background Stylus variable.
        Also, I think tooltips just place whatever you pass between them as slots, so you should be able to just style it yourself.

        <template>
          <q-btn>
            Button
            <q-tooltip>
             <div class="my-tooltip-content"></div>
            </q-tooltip>
          </q-btn>
        </template>
        
        <style>
          .my-tooltip-content {
            font-size: 2rem;
          }
        </style>
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post