My CSS code includes several commands that target similar elements, but the resulting design appears messy. I am seeking advice on a more effective way to select these elements in a conventional manner. Despite consulting documentation, I have resorted to reaching out to the community for help once again.
Code:
.customRadioNPS .generic_radio_1, .customRadioNPS .generic_radio_2{
background:#33CC66;
height: 40px;
width: 40px;
}
.customRadioNPS .generic_radio_3, .customRadioNPS .generic_radio_4, .customRadioNPS .generic_radio_5, .customRadioNPS .generic_radio_6, .customRadioNPS .generic_radio_7, .customRadioNPS .generic_radio_8{
background:#FFFF99;
height: 40px;
width: 40px;
}
.customRadioNPS .generic_radio_9, .customRadioNPS .generic_radio_10{
background:#FF3333;
height: 40px;
width: 40px;
}
.customRadioNPS .generic_roption_1, .customRadioNPS .generic_roption_2{
background:#33CC66;
}
.customRadioNPS .generic_roption_3, .customRadioNPS .generic_roption_4, customRadioNPS .generic_roption_6, .customRadioNPS .generic_roption_7, .customRadioNPS .generic_roption_8{
background:#FFFF99;
}
.customRadioNPS .generic_roption_9, .customRadioNPS .generic_roption_10{
background:#FF3333;
}
.customRadioNPS .generic_roption_5{
border-right: 2px dashed gray;
background:#FFFF99;
}
All the styles are contained within the customRadioNPS class, but I am unsure if there is a more efficient approach that could eliminate the need to repeatedly reference .customRadioNPS?