Re: Thoughts on "Parent Element Selector"

The Relational Pseudo-Class, :has(), can do that for you:

P:has(> C)

See the specification at https://drafts.csswg.org/selectors-4/#relational
for more info.
There are also a lot of resources on this available, which you can find
with any search engine by searching for “CSS Parent Selector”.

On Mon, Jan 6, 2025 at 9:29 AM 488269508@qq.com <488269508@qq.com> wrote:

> To the members of the W3C organization:
>         This is just an email that may seem ridiculous to you. I think
> since there are child element selectors(P > C), Is it possible to design a
> selector for the parent element? (For example, C < * represents all the
> parents of the child element C.)
>
> yours,
>                                       you can call me "izzaque"
>

Received on Monday, 6 January 2025 08:42:07 UTC