felipefialho / css-components

:coffee: A set of common UI Components using just the power of CSS and without JavaScript.
https://css-components.felipefialho.com/
MIT License
693 stars 126 forks source link

Collapse: Suggest moving checkbox to allow increased styling possibilities #33

Open constructit opened 8 years ago

constructit commented 8 years ago

Would it be ok to move the checkbox .collapse-open in front of .collapse-btn? By doing this it is possible to style .collapse-btn based on the open/closed state. For example background color, font weight or an icon as in the following example:

https://jsfiddle.net/mrgiao/2xfuwaLq/

felipefialho commented 8 years ago

Make sense!

I'll make this change in the next release.

:D

Thanks!

constructit commented 8 years ago

Same goes for radio buttons in the collapse with accordion. Move in front of .collapse-btn:

https://jsfiddle.net/mrgiao/ytxgysxy/