Reputation: 75
I am using custom color variables in order to change button colors and it is working fine. I am using elementRef.
Problem is when I try to change body background color, even when I point to the variable, body is still taking default color.
:root{
--body-background-color: #f7b219;
}
body,
html{
background-color: var(--body-background-color) !important;
}
Where am I wrong?
Upvotes: 0
Views: 940
Reputation: 1578
Try
:root {
--main-bg-color: #f7b219;
}
body {
background-color: var(--main-bg-color);
}
Upvotes: 1