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
does
.filter-bar ::part(...)
exist?Absolutely!
does that selector work?
what i think that you're trying to do is
.filter-bar::part(...)
instead
which is a WIDLY different selectorNo. the part is INSIDE .filter-bar.
then it seems that the selector you have should work
i tested it in jsfiddle and it works, but with other elements