- From: Tommy Hodgins via GitHub <sysbot+gh@w3.org>
- Date: Thu, 06 Apr 2017 19:40:35 +0000
- To: public-css-archive@w3.org
Imagine if `:has()` was as easy to implement as one of these examples: ```css /* Emulating section:has(h2) */ /* if (condition) "selector" */ @element 'section' { eval('if (querySelector("h2")) "$this"') { border: 1px solid lime; } } /* condition ? "selector" : "" */ @element 'section' { eval('querySelector("h2") ? "$this" : ""') { box-shadow: purple 10px 10px 0; } } /* condition && "selector" */ @element 'section' { eval('querySelector("h2") && "$this"') { background: darkblue; } } ``` Working demo: http://codepen.io/tomhodgins/pen/yMpdOz -- GitHub Notification of comment by tomhodgins Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1176#issuecomment-292291310 using your GitHub account
Received on Thursday, 6 April 2017 19:40:41 UTC