Giter Site home page Giter Site logo

bug: Long tab names are squished about daisyui HOT 3 OPEN

ooker777 avatar ooker777 commented on June 18, 2024 1
bug: Long tab names are squished

from daisyui.

Comments (3)

ooker777 avatar ooker777 commented on June 18, 2024 2

You can prevent that by setting grid-column of the tab panel to the amount of tabs you have:

<div class="w-[274px]">
  <div role="tablist" class="tabs tabs-lifted">
<input type="radio" name="my_tabs_2" role="tab" class="tab" aria-label="Tab 1 is very long" />
<div role="tabpanel" class="tab-content bg-base-100 border-base-300 rounded-box p-6"></div>

<input type="radio" name="my_tabs_2" role="tab" class="tab" aria-label="Tab 2 is very very long" checked />
<div role="tabpanel" class="tab-content bg-base-100 border-base-300 rounded-box p-6 !col-span-2">
  11112222333344445555666677
</div>
  </div>
</div>

As for why it happens, the .tab-content has:

grid-column-start: 1;
grid-column-end: span 9999;

At the small width of 274px, the content of the .tab-content becomes significant and affects the width of these other 9997 grid column tracks that the .tab-content spans, shrinking the grid column tracks that the tab labels reside.

Source: Why are the tab label widths started to squish when their respective content panels have more than 32 characters?

from daisyui.

github-actions avatar github-actions commented on June 18, 2024

Thank you @ooker777 for reporting issues. It helps daisyUI a lot 💚
I'll be working on issues one by one. I will help with this one as soon as a I find a solution.
In the meantime providing more details and reproduction links would be helpful.

from daisyui.

tonyalaribe avatar tonyalaribe commented on June 18, 2024

I ran into this issue as well

from daisyui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.