- From: Daniel Freedman <notifications@github.com>
- Date: Thu, 24 Mar 2016 11:00:15 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Message-ID: <w3c/webcomponents/issues/426/200950974@github.com>
These new pseudo classes splayed out across multiple comments are very confusing. Let me try to summarize: 1. `:host` / `:shadow-host` - style the host of a shadowroot from inside the shadowroot 2. `:has-shadow-root` - matches any element in the "current" scope that has a shadowroot 3. `:potentially-custom` - matches any element that has a dash in the tagname? Does that sound right? If so, I don't think there's a real usecase for `:has-shadow-root`. It is unlikely that an author would mean to use anything other than `display`, as the selector is very broad. In fact, it is far more likely that the author would rather encapsulate the display styling either inside the shadow root with `:host` or perhaps another option to `attachShadowRoot` that can set the default styling. Would `:potentially-custom` only match custom element candidates that don't have a definition? That could potentially be useful for styling lazily-defined elements to speed up first paint. If it always matches custom elements, I'm less optimistic of its utility. --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/426#issuecomment-200950974
Received on Thursday, 24 March 2016 18:00:43 UTC