Vanilla nested CSS query

Hi all, I wonder if anyone can help me figure out why the following CSS will not work? ::part(form-control-label) { .filter-bar & { color: yellow; } } but this CSS does: ::part(form-control-label) { color: yellow; } As far as I know, the nested selector (&) is allowed to be used this way so I expect it to work. Any suggestions?
5 Replies
ἔρως
ἔρως4d ago
does .filter-bar ::part(...) exist?
rctneil
rctneilOP4d ago
Absolutely!
ἔρως
ἔρως4d ago
does that selector work? what i think that you're trying to do is .filter-bar::part(...) instead which is a WIDLY different selector
rctneil
rctneilOP4d ago
No. the part is INSIDE .filter-bar.
ἔρως
ἔρως4d ago
then it seems that the selector you have should work i tested it in jsfiddle and it works, but with other elements

Did you find this page helpful?