- From: Hayato Ito <notifications@github.com>
- Date: Mon, 25 May 2015 01:48:24 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Message-ID: <w3c/webcomponents/issues/64@github.com>
Title: [Shadow]: Consider a <content> selector for "nodes not otherwise distributed" (bugzilla: 22268) Migrated from: https://www.w3.org/Bugs/Public/show_bug.cgi?id=22268 ---- comment: 0 comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=22268#c0 *Jan Miksovsky* wrote on 2013-06-04 20:33:21 +0000. See the thread at https://groups.google.com/forum/#!topic/polymer-dev/mTM1-rByfZY for a limitation of the current spec. The current design of <content></content> means the default insertion point for all nodes not otherwise distributed (via select="...") must always appear last in the template. This could lead to situations where it is difficult to update a template and reposition this default insertion point before other insertion points that have explicit select="..." clauses. It would be beneficial if there were a way to explicit indicate that <content></content> element should pick up all nodes not otherwise distribution to other insertion points. Alternatively, the meaning of the plain <content></content> form could be changed to: "insert here all nodes not otherwise distributed, including nodes distributed to insertion points which follow this default insertion point". ---- comment: 1 comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=22268#c1 *Dominic Cooney* wrote on 2013-06-05 06:50:43 +0000. You may be able to work around this problem by using CSS Regions. Two slightly more powerful mechanisms than the proposal to make <content> happen "last" are: 1. Distribute to <content> elements not in document order, but in selector specificity order. Make <content> with no selector less specific than any selector. Document order of <content> element is a fallback for tiebreaking. 2. Let the author separately specify an order to do distribution. ---- comment: 2 comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=22268#c2 *Jan Miksovsky* wrote on 2013-06-06 00:42:16 +0000. I think you understand the use case, and defer to your judgment on the best solution. My proposal was just an example. For reference: I did try using CSS regions to workaround this problem, but am unable to get this to work. See http://jsbin.com/areqez/1/edit. I'll follow up separately on that. ---- comment: 3 comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=22268#c3 *Michael Labriola* wrote on 2013-10-14 19:21:00 +0000. Personally I like @Dominic-(migrated-from-bugzilla-to-avoid-pinnging-users-in-github)'s first proposal. I think the root of the problem is that node distribution is in document order instead of the order of a form of specificity. ---- comment: 4 comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=22268#c4 *Steve Orvell* wrote on 2013-11-07 15:28:28 +0000. I prefer Dominic's suggestion #2. The author could specify selectIndex attribute on insertion points which would conceptually act like tabIndex. I think the problem with #1 is that the set of selectors used for insertion points is already highly limited. I think, in practice, this would make using specificity problematic. ---- comment: 5 comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=22268#c5 *Anne* wrote on 2015-04-27 05:45:15 +0000. This might be moot if we get an API. --- Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/64
Received on Monday, 25 May 2015 08:49:03 UTC