Styling select2 with required:valid

I have a page that uses normal HTML form elements and I’ve added CSS so that when a required element is filled in (i.e. a select has a value chosen or an input has content) then the element turns green around the edge.

This is done using the following…

input:required:valid, select:required:valid {
	border: 2px solid green;
}

I’ve tried adding the select2 elements (such as select2-container) to the CSS, but to no avail. Does anyone know (a) if what I’m trying to do is possible and (b) if it is, which elements I’d need to add to the CSS?

Thanks!