PolymerElements / paper-button

A button à la Material Design
https://www.webcomponents.org/element/PolymerElements/paper-button
138 stars 64 forks source link

paper-button imports paper-material #131

Closed mgiuffrida closed 7 years ago

mgiuffrida commented 7 years ago

It's weird that paper-button imports paper-material.html just to include paper-material's :host([animated]) style rule (and paper-material-shared-styles, but it could import that directly). It's unfortunate someone using paper-button has to include the paper-material element, run its JavaScript, etc. just to share styling.

Or is it not weird? I had the impression <style include="foo"> was intended just for foos that declare a <style> and nothing else (certainly not JavaScript) -- maybe that's an incorrect assumption.

mgiuffrida commented 7 years ago

PR #114 addresses this, but 1. it could be a breaking change (if someone's custom element was including only paper-material-shared-styles, using an animated attribute, and didn't want the shadow transition [EDIT: I have no idea what that was supposed to mean]) and 2. I'd appreciate clarification on whether or not the pattern should be discouraged.

keanulee commented 7 years ago

I don't think it's a breaking change, since it only adds the [animated] style to paper-button's shadow DOM, and should be safe to merge. @notwaldorf @cdata can one of you confirm?

mgiuffrida commented 7 years ago

@keanulee I agree, I have no idea what I was trying to say.

keanulee commented 7 years ago

Closing - #114 merged and v1.0.13 released.