vuematerial / vue-material

Vue.js Framework - ready-to-use Vue components with Material Design, free forever.
https://www.creative-tim.com/vuematerial
MIT License
9.89k stars 1.16k forks source link

missing `$` on md-theme-property-by-hue makes it "impossible" to style anything that takes `variant` argument #2166

Open moshmage opened 4 years ago

moshmage commented 4 years ago

I was checking the source to understand how I would style the error part of the theme and only found a hacky way of introducing that variable to the css after vuematerial had done so. I don't like this, but it's what it is;

While looking at the variable name I noticed the source code has a missing $

@mixin md-theme-property-by-hue ($property, $color, $hue, $type, $secondary) {
  $hex: md-get-palette-color($color, $hue);
  $variant: null;

  @if $secondary != "" {
    $variant: -#{$secondary};
  }

  #{$property}: $hex;
  #{$property}: var(--md-theme-#{$md-current-theme}-#{$type}#{variant}, $hex);
}

line in question, #{$property}: var(--md-theme-#{$md-current-theme}-#{$type}#{variant}, $hex); "variant" should read "$variant".

Any other way I can introduce a theme color for "error"?