I need to select only those elements that have pseudo-elements ::before & ::after (not necessarily at the same time). Also, I need to apply styles to these pseudo-elements.
I thought this solution would work:
*:has(::before, ::after) {
content: '';
/* Something else ... */
}