balmjs / balm-ui

:diamonds: A modular and customizable UI library based on Material Design and Vue
https://material.balmjs.com
MIT License
505 stars 30 forks source link

Textfield floating label doesn't follow theme colors #176

Closed loicdekester closed 10 months ago

loicdekester commented 10 months ago

Development Relevant Information:

Description:

When changing the theme colors like so: app.use(BalmUI, { $theme: { primary: "#ffd54f", secondary: "#ec407a" }, });

The floating label of the textfield when focused is still purple and it should be yellow: image image

Steps To Reproduce:

  1. Create vue Project
  2. Add balm-ui dependency
  3. Change $theme.primary color
  4. Add ui-textfield with a label to the DOM
  5. When focusing the textfield the label has the wrong color.

https://jsfiddle.net/loicdekester/bnmdwsj3/

elf-mouse commented 10 months ago

Hi @loicdekester , This is a default value bug in the MDC design.

You need overwrite sass variables like this:

@use '@material/textfield' with (
  // $focused-label-color: rgba(theme-color.prop-value(primary), 0.87),
  $focused-label-color: primary,
);
loicdekester commented 10 months ago

Thank you for the quick support. I will use scss files for the theming from now on.