Recusrively Nested Accordion Chevron Animation #1763
-
I am having trouble getting recursively nested accordion chevrons to animate correctly. They seem to take the data-state from the original See here for example of the issue: https://codesandbox.io/s/cool-brook-m7sznz Any help on this would be greatly appreciated, thanks! 😄 Answer: Put a namespace on the trigger: [ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Good ol' CSS specificity 🙂 "[data-state=open] > &": { transform: "rotate(180deg)" } |
Beta Was this translation helpful? Give feedback.
Good ol' CSS specificity 🙂
Worth noting, another way is to make it more specific with the
>
selector like you have in the linked demo at the moment above: