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

    QTooltip max-width property

    Help
    2
    4
    1871
    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
      jeffatpf last edited by

      As currently implemented the QTooltip component has a max-height property but no max-width property. A popup with a long string can be the full page width.

      I’d very much like:

      (1) a QTooltip max-width property

      or

      (2) a default maximum width, ala

      el.style.maxHeight = maxHeight || ‘65vw’

      in …utils/popup.js.

      (3) a workaround?

      Thanks.

      1 Reply Last reply Reply Quote 0
      • rstoenescu
        rstoenescu Admin last edited by

        The tooltip takes the shape of its content. So why not putting your QTooltip content inside a <div> which has max-width CSS prop set?

        <q-tooltip ...>
          <div style="max-width: 100px">
             ...tooltip content
          </div>
        </q-tooltip>
        
        1 Reply Last reply Reply Quote 0
        • J
          jeffatpf last edited by

          @rstoenescu - I had tried this with ‘%’ to no effect. Works as expected with ‘px’.

          1 Reply Last reply Reply Quote 0
          • rstoenescu
            rstoenescu Admin last edited by

            “%” has no meaning there. Percentage of what? 🙂 Either use “vw” or a fixed size in px, em, rem, …

            1 Reply Last reply Reply Quote 0
            • First post
              Last post