- From: Xidorn Quan <quanxunzhen@gmail.com>
- Date: Tue, 15 Mar 2016 22:45:00 +0800
- To: Chase Willden <chase.willden@gmail.com>
- Cc: www-style list <www-style@w3.org>
Received on Tuesday, 15 March 2016 14:46:07 UTC
On Tue, Mar 8, 2016 at 6:30 PM, Chase Willden <chase.willden@gmail.com> wrote: > Wouldn't it be nice to have new CSS pseudo elements :has-child(), > :contains(), :has-parent(), and :parent? > Is this already on the roadmap? > They are not pseudo elements, they are pseudo classes. What's the use of :has-parent()? Isn't "child:has-parent(parent)" just "parent > child"? For :parent, I think either I misunderstand the purpose of it, or you misunderstand what a pseudo class means. :has-child() and :contains() are just :has(). It has been included in the Selectors Level 4 spec [1], although it is only usable in DOM API, not in CSS, because no one knows how to implement it efficiently enough yet. [1] https://drafts.csswg.org/selectors-4/#relational - Xidorn
Received on Tuesday, 15 March 2016 14:46:07 UTC