Is there a way to dynamically change the color of a label using CSS based on its content? For example, changing the color of the label depending on the day of the week: Mon = yellow, Tue = Pink ... Sun = red.
This is a toggler for the label property. It would be great if it could achieve this functionality.
input[type=checkbox]:checked + label {
background:#0099cc;
border-radius:3px;
color: #ffffff;
font-weight:bold;
padding:0px 3px 0px 3px;
}
So, ideally the code should modify the label like this:
input[type=checkbox]:checked + label[id=1] {
background:#0099cc;
border-radius:3px;
color: #ffffff;
font-weight:bold;
padding:0px 3px 0px 3px;
}
I'm not very experienced with CSS, any suggestions?