Re: [w3c/webcomponents] The is="" attribute is confusing? Maybe we should encourage only ES6 class-based extension. (#509)

I really like @WebReflection's take on this, because it strikes a balance between "here's a mess of parts, good luck" and an all-in-one inheritance approach. Here's a slight tweak I was considering after reading Andrea's comment:

```javascript
customElements.defineExtension(
  'button-like',
  {
    implements: [
      HTMLImageBehavior,
      HTMLButtonBehavior,
      HTMLButtonAppearance
    ]
  }
);
```

Hopefully you could target these bundles in CSS too, consider:

```css
form *:extensions(button-like) {

}
```

It would be nice to have behavior and appearance buckets that map 1:1 to their native element roots. I feel this would result in elements that are more cohesive across custom implementations.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/509#issuecomment-281107865

Received on Monday, 20 February 2017 15:28:31 UTC