-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Runtime theming doesn't allow to change some element's colors #14
Comments
Thanks @schellmax I have checked:
I will improve these problems as soon as possible BTW, The old theme API (e.g.
|
Hi @schellmax, I have fixed the problem in And, about Focused Textfield/Select Label solution: Method 1: using some toolchain (like BalmCLI), you can overwrite sass variable in // fix(@mdc): for changing theme, but the color is opacity!!!
@use '@material/textfield' with (
$focused-label-color: primary
);
@use '@material/select' with (
$focused-label-color: primary
);
@use 'balm-ui/dist/balm-ui'; Method 2: using CDN, overwrite css manually, like this: .mdc-text-field--focused.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label {
color: red
}
.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label {
color: red
} Thanks your issue again :) |
Method 2:
|
Note: I'm using the CDN version here!
Most colors can be changed at runtime inside vue using
this.$setTheme('primary', 'black');
But some colors seem to be hardcoded, and require overrides in css, such as:
This can easily be reproduced in the docs at https://material.balmjs.com/#/theme/color
Changing the color (button in the top right corner) won't affect the following:
The text was updated successfully, but these errors were encountered: