I'm having some trouble getting a simple CSS rule to work. I want to have an option field in a select element change it's color when it's selected. According to w3school :checked would be the correct selector as it applies to input and option. It might be a totally easy fix but I can't figure out what's wrong. Any ideas?
#location-options select option:checked {
color: red;
}
<form id="location-options">
<select name="location-category" id="location-category">
<option value="">Select</option>
<option value="test1">Imbiss</option>
<option value="test2">Restaurant</option>
</select>
</form>