applyTheme($main, $contrast, $light, $dark)
  background: $main
  color: $contrast

applyThemeInverse($main, $contrast, $light, $dark)
  applyTheme($contrast, $main, $light, $dark)

applyThemeBackgroundHover($main, $contrast, $light, $dark)
  background: darken($main,10)

applyThemeBackgroundActive($main, $contrast, $light, $dark)
  background: lighten($main,10)

applyThemeBackgroundHoverInverse($main, $contrast, $light, $dark)
  background: darken($contrast,10)

applyThemeBackgroundActiveInverse($main, $contrast, $light, $dark)
  background: darken($contrast,20)

button.rectButton
  commonFontStyles()
  position: relative
  display: inline-flex
  align-items: center
  justify-content: center
  height: 40px
  padding: 0 15px
  $smallBorderRadius()
  $commonBoxShadow(.2)
  transition: transitOpacity(), transit('box-shadow', .3s), transit('background', .3s)
  applyAllThemes(applyTheme)

  &.flat
    $commonBoxShadow(0)

  &.inverse
    applyAllThemes(applyThemeInverse)
    &:hover
      applyAllThemes(applyThemeBackgroundHoverInverse)

    &:active
    &.active
      applyAllThemes(applyThemeBackgroundActiveInverse)


  &:hover
    applyAllThemes(applyThemeBackgroundHover)

  &:active
  &.active
    applyAllThemes(applyThemeBackgroundActive)

  &[disabled]
  &.disabled
    opacity: .5
    cursor: not-allowed
