PolymerElements / paper-button

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

[disabled] state should respect [raised] #127

Open icmdaf opened 7 years ago

icmdaf commented 7 years ago

The current default style applies a background color to all disabled buttons. But according to the material spec, flat disabled buttons don't have a background, just gray text.

Can we split the style and align it closer with the spec (also using the theme colors for disabled text instead of the hardcoded grey value etc)

:host([disabled]:not([raised])) {
  ...
  @apply(--paper-button-disabled);
  @apply(--paper-button-flat-disabled);
}
:host([disabled][raised]) {
  ...
  @apply(--paper-button-disabled);
  @apply(--paper-button-raised-disabled);
}
keanulee commented 7 years ago

@notwaldorf Would this be considered a breaking change? (If so, something to add to the backlog when we do bump versions.)

notwaldorf commented 7 years ago

Ugh, I'm confused about the spec. The image shows the flat disabled buttons not having a background, but the video below it shows them as having one.

Someone should double check this with @zgibson :)

notwaldorf commented 7 years ago

@keanulee: to answer your question: Depending on what we decide is correct, I would maybe consider this a breaking change, yes.

anentropic commented 7 years ago

I find it bizarre that the raised button 'raises' further when you press on it