antoniandre / wave-ui

A UI framework for Vue.js 3 (and 2) with only the bright side. ☀️
https://antoniandre.github.io/wave-ui
MIT License
549 stars 40 forks source link

w-accordion: rotate expand icons of immediate item titles only #76

Closed samuelbrian closed 2 years ago

samuelbrian commented 2 years ago

Hi,

I was implementing a collapsible tree menu with accordions and noticed that nested expand/collapse icons were all synchronized with the root accordion item's expand/collapse icon.

What do you think about this fix?


Previously, accordions inside an accordion item would have all expand/collapse icons set to expand when the root accordion item was expanded. This was caused by the root accordion's CSS rules applying to the sub-accordions. To avoid this, the CSS rotate rules for the icon must select the immediate item title's icon more explicitly.

antoniandre commented 2 years ago

Thanks @samuelbrian for reporting, finding a fix and submitting this PR! :) I have merged it in and improve the CSS targeting, to make it easier to override. Now released in version 1.45.7.