Skip to content

bug: join-item uses ancestor formatting instead of parent formatting #4506

@jsulgrove

Description

@jsulgrove

Reproduction URL (Required)

https://play.tailwindcss.com/wVlpP4PS2P

What version of daisyUI are you using?

5.5.19

Which browsers are you seeing the problem on?

All browsers

Describe your issue

I'm working on a documentation webpage that requires nested accordions. I've come across an issue with the join-item class: when it is a descendent of multiple join classes, it applies formatting in relation to the ancestor instead of the parent. It should be the other way around - the closest join's formatting should be applied.

In the example provided, notice how the top element in the sub-accordion receives last child formatting.

I believe this can be fixed with scoped styles: https://caniuse.com/css-cascade-scope

@scope (.join) to (.join) {
    ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions