Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ZreXoc opened this issue Sep 26, 2024 · 4 comments
Labels

Comments

@ZreXoc
Copy link

ZreXoc commented Sep 26, 2024

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>

Copy link

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.

@ukeloop
Copy link

ukeloop commented Oct 9, 2024

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>

@ZreXoc
Copy link
Author

ZreXoc commented Oct 10, 2024

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>

@saadeghi
Copy link
Owner

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

@saadeghi saadeghi added the v5 label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants