8manos / wc-variations-radio-buttons

Let your customers choose product variations using radio buttons instead of dropdowns.
https://wordpress.org/plugins/wc-variations-radio-buttons/
GNU General Public License v2.0
62 stars 34 forks source link

Adding classes for inline radio buttons #27

Closed nicomollet closed 6 years ago

nicomollet commented 6 years ago

I added new classes, to be able to style each attribute, and make some radio buttons inline.

Thank you.

Mantish commented 6 years ago

Hi, thanks for the pull request can you explain a bit more why these classes are needed? why can't you style the elements using the current markup?

nicomollet commented 6 years ago

I want to be able to have some variations with horizontal radio buttons, and some others vertical. See this image for an example: https://imgur.com/a/COqAP

Do you think I can do this with the current markup?

Mantish commented 6 years ago

To style some attributes different you need the class on the <tr> But I think the class on the <div> is not needed. You can target it with something like .variations td > div

nicomollet commented 6 years ago

Alright, I can do without the class on the <div> like you said, it's fine.

If you think the class on the <tr> doesn't hurt the project, I would appreciate the tweak ;) I just reverted the class in my pull request. So you may publish it as it is.

Thank you.