daisyui icon indicating copy to clipboard operation
daisyui copied to clipboard

bug: 'join-vertical md:join-horizontal' failed to set horizontal style border on nest join-item

Open ZreXoc opened this issue 1 year ago โ€ข 4 comments

What version of daisyUI are you using?

No response

Which browsers are you seeing the problem on?

Firefox

Reproduction URL

https://play.tailwindcss.com/X7oydx51nb

Describe your issue

border of nest join-item doesn't change into horizontal style in md breakpoint.

<div class="join w-[80vw] flex join-vertical md:join-horizontal bg-slate-500 p-2">
  <button class="btn join-item">111</button>
  <div class="flex-1">
    <button class="btn join-item w-full bg-slate-200">222</button>
  </div>
</div>

ZreXoc avatar Sep 26 '24 13:09 ZreXoc

Thank you @ZreXoc 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.

github-actions[bot] avatar Sep 26 '24 13:09 github-actions[bot]

The join-item class must be used directly under the join class.

Example code:

<div class="join w-[80vw] flex join-vertical md:join-horizontal bg-slate-500 p-2">
  <button class="flex-none btn join-item">111</button>
  <button class="flex-1 btn join-item bg-slate-200">222</button>
</div>

ukeloop avatar Oct 09 '24 16:10 ukeloop

The join-item class must be used directly under the join class.

That's not correct: Even if join-item is not a direct child of the group, it still gets the style. So it might be a bug with join-vertical and join-horizontal.

I have to wrap the button in div for some reason and I solved it as follows:

<div class="join w-[80vw] flex join-vertical md:join-horizontal bg-slate-500 p-2">
  <button class="btn join-item">111</button>
  <div class="flex-1 contents join-item">
    <button class="btn w-full bg-slate-200 rounded-[inherit]">222</button>
  </div>
</div>

ZreXoc avatar Oct 10 '24 06:10 ZreXoc

This is a bug and it will be fixed in daisyUI 5.

saadeghi avatar Oct 10 '24 09:10 saadeghi