Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Textfield floating label doesn't follow theme colors #176

Closed
loicdekester opened this issue Nov 14, 2023 · 2 comments
Closed

Textfield floating label doesn't follow theme colors #176

loicdekester opened this issue Nov 14, 2023 · 2 comments

Comments

@loicdekester
Copy link

Development Relevant Information:

  • BalmUI version: v 10.23.0
  • Browser: Chrome v 119.0.6045.124
  • Operating System: Windows 10

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
Copy link
Member

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants