Re: Base Template (Was Re: Minimum viable custom elements)
Dimitri: Okay, I can follow up with Ryosuke. I’m happy to share our thoughts and needs for subclassing components. Anne/Steve: I’d originally indicated that this technique couldn't be applied to extending native HTML elements. Since the two of your seemed interested in that, I spent some time tinkering with the idea, and it turns out that this technique can be made to work for that situation. I’ve posted a quick demo (http://janmiksovsky.github.io/base-template/extendButton.html http://janmiksovsky.github.io/base-template/extendButton.html) showing subclassing of a standard HTML button element. This works best under native Shadow DOM. Under polyfilled Shadow DOM, base class styles can’t (yet?) be inherited. Anyway, I mention this in case it opens up some ideas. Thanks for the inspiration!
Re: Base Template (Was Re: Minimum viable custom elements)
Ryosuke, Jan, It might be useful for you two folks to work through Jan's Shadow DOM composition/inheritance insight (use cases?) together and see how they could be resolved without having multiple shadow roots per element. I would love to take advantage of all the work you both have done thinking about this problem separately. :DG On Thu, Feb 12, 2015 at 9:46 AM, Ryosuke Niwa rn...@apple.com wrote: On Feb 12, 2015, at 4:50 AM, Steve Faulkner faulkner.st...@gmail.com wrote: On 12 February 2015 at 10:58, Anne van Kesteren ann...@annevk.nl wrote: which is a very different problem from what you want to solve, no? The problem I think needs solving for minimum viable custom elements is reducing reliance on bolt-on accessibility. From the example provided http://janmiksovsky.github.io/base-template/ it appears that in this instance it does achieve that end. I don't know whether this will extend to other UI controls or whether it is a practical solution, which is why I brought it to the list for discussion. Again, this proposal or subclassing problem is nothing to do with custom elements but all do with shadow DOM. Ironically, I've pointed out the exact same problem explained in this page last April and proposed to change the way shadow DOM works to solve it: https://lists.w3.org/Archives/Public/public-webapps/2014AprJun/0151.html - R. Niwa
Base Template (Was Re: Minimum viable custom elements)
On Feb 12, 2015, at 4:50 AM, Steve Faulkner faulkner.st...@gmail.com wrote: On 12 February 2015 at 10:58, Anne van Kesteren ann...@annevk.nl mailto:ann...@annevk.nl wrote: which is a very different problem from what you want to solve, no? The problem I think needs solving for minimum viable custom elements is reducing reliance on bolt-on accessibility. From the example provided http://janmiksovsky.github.io/base-template/ http://janmiksovsky.github.io/base-template/ it appears that in this instance it does achieve that end. I don't know whether this will extend to other UI controls or whether it is a practical solution, which is why I brought it to the list for discussion. Again, this proposal or subclassing problem is nothing to do with custom elements but all do with shadow DOM. Ironically, I've pointed out the exact same problem explained in this page last April and proposed to change the way shadow DOM works to solve it: https://lists.w3.org/Archives/Public/public-webapps/2014AprJun/0151.html https://lists.w3.org/Archives/Public/public-webapps/2014AprJun/0151.html - R. Niwa