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

Re: Minimum viable custom elements

From: Anne van Kesteren <annevk@annevk.nl>
Date: Fri, 30 Jan 2015 17:46:49 +0100
Message-ID: <CADnb78jX22ZnYeGmXSeqZaugTtbrT1doAQayBE5Z7xfuq+Jeng@mail.gmail.com>
To: Steve Faulkner <faulkner.steve@gmail.com>
Cc: Ryosuke Niwa <rniwa@apple.com>, WebApps WG <public-webapps@w3.org>
On Fri, Jan 30, 2015 at 11:05 AM, Steve Faulkner
<faulkner.steve@gmail.com> wrote:
> In this radio and checkbox example (view in chrome)
> https://rawgit.com/alice/web-components-demos/master/index.html
> (which has been referenced several times in this thread, but no one has
> critiqued to my knowledge) all of the above are evident, while at the same
> time appearing to overcome the issue of standard control fugliness

The only way it overcomes that is by relying on a proprietary
extension called -webkit-appearance that is not standardized and does
not work reliably across browsers. Furthermore, it's not at all clear
to me why that example needs custom elements to begin with. If we
assume this proprietary extension exists, we can just do this:

http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=3397

Which is much much simpler and requires none of the HTML imports,
shadow tree, and all that script. It's also fully accessible and
backwards compatible to the same extent. And shows that the real
tidbit here is -webkit-appearance and not custom elements at all.

(For identical styling you need to move the background-image line into
a distinct input:checked selector block. I messed up a bit with copy
and pasting.)


-- 
https://annevankesteren.nl/
Received on Friday, 30 January 2015 16:47:13 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:25 UTC