Re: Minimum viable custom elements

> On Feb 4, 2015, at 9:05 AM, Steve Faulkner <faulkner.steve@gmail.com> wrote:
> 
> On 4 February 2015 at 16:51, Ryosuke Niwa <rniwa@apple.com <mailto:rniwa@apple.com>> wrote:
> <my-custom-formatter><input></my-custom-formatter>
> 
> I think if this worked. i.e. hid the styling and allowed styling over top, while allowing access to the input functionality would be a good solution for the many many instances of native controls being remade as custom controls simply to be able to control style.
> 
> I made a simple example of using <canvas> to host a checkbox, as an experiment:
> http://codepen.io/stevef/pen/OPxvZX <http://codepen.io/stevef/pen/OPxvZX>
> 
> note: am not saying <canvas> is a solution, like is= it provides the ability to make use of built in features of native controls. which is the outcome I would like to see baked into web components.


Right.  As I mentioned earlier, shadow DOM or decorator is what provides the styling-over-top capability.  And I assure you, Anne and everyone else at each browser vendor is interested in solving that problem.

> On Feb 4, 2015, at 9:41 AM, Chris Bateman <chrisb808@gmail.com> wrote:
> 
> Yeah, I had noted in that post that wrapping a native element with a custom element was an option - only drawback is that the markup isn't as terse (which is generally advertised as one of the selling points of Custom Elements). But that doesn't seem like a deal breaker to me, if subclassing needs to be postponed.

Great to hear!  We should make sure custom elements accommodates this composition pattern then.

- R. Niwa

Received on Wednesday, 4 February 2015 18:32:05 UTC