W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2015

Re: Minimum viable custom elements

From: Ryosuke Niwa <rniwa@apple.com>
Date: Wed, 04 Feb 2015 10:31:36 -0800
Cc: Anne van Kesteren <annevk@annevk.nl>, WebApps WG <public-webapps@w3.org>
Message-id: <BF4F5938-A3C5-4EE3-87D0-434A9D8BB8FB@apple.com>
To: Chris Bateman <chrisb808@gmail.com>, Steve Faulkner <faulkner.steve@gmail.com>

> 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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:43 UTC