You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
$mdThemingProvider backgroundPalette does not theme the background #1450
it takes the 'A100' value when you set the backgroundPalette, so maybe an easy workaround will be that you can put the background color on the 'A100' while this get fix... what do u think?
This issue is similar to #1321 . The reason why it takes the 'A100' value always is because it is the default color for 'hue-3'.
Below is the excerpt from theming.js
THEME_COLOR_TYPES.forEach(function(colorType) {
// Color types with unspecified default hues will use these default hue values
var defaultDefaultHues = {
'default': '500',
'hue-1': '300',
'hue-2': '800',
'hue-3': 'A100'
};
if (!LIGHT_DEFAULT_HUES[colorType]) LIGHT_DEFAULT_HUES[colorType] = defaultDefaultHues;
if (!DARK_DEFAULT_HUES[colorType]) DARK_DEFAULT_HUES[colorType] = defaultDefaultHues;
});
And after digging in the code i found that the theme sass files for components have hard coded background color as:
The above example is from content-theme.scss. Similar mention is also found in other theme files like dialog-theme.scss, sidenav-theme.scss, slider-theme.scss and subheader-theme.scss.
The solution that i propose for this is something like this
This has started working for me in my local build. But i guess the solution would be more comprehensive - providing background capabilities in a more generic manner. Just putting it out there. Hope it helps
Activity
bonzanni commentedon Feb 26, 2015
It would be really great to have this working.
ThomasBurleson commentedon Feb 26, 2015
@rschmukler - any interim thoughts while we resolve this for 0.9.x ?
aneurysmjs commentedon Feb 26, 2015
it takes the 'A100' value when you set the backgroundPalette, so maybe an easy workaround will be that you can put the background color on the 'A100' while this get fix... what do u think?
gustavohenke commentedon Mar 2, 2015
@blackendstudios that trick helped me, but I rather use something less "hacky", so I'll just 👍 this issue.
aneurysmjs commentedon Mar 2, 2015
ohhhh glad that helped...it was my firts contribution on git hubjajajaja ...great...hope to help more in the future
Hendrixer commentedon Mar 9, 2015
👍
arshabh commentedon Mar 18, 2015
This issue is similar to #1321 . The reason why it takes the 'A100' value always is because it is the default color for 'hue-3'.
Below is the excerpt from
theming.jsAnd after digging in the code i found that the theme sass files for components have hard coded background color as:
The above example is from
content-theme.scss. Similar mention is also found in other theme files likedialog-theme.scss,sidenav-theme.scss,slider-theme.scssandsubheader-theme.scss.The solution that i propose for this is something like this
This has started working for me in my local build. But i guess the solution would be more comprehensive - providing background capabilities in a more generic manner. Just putting it out there. Hope it helps
ppkn commentedon Mar 31, 2015
@blackendstudios Do you change the 'A100' value on
primaryPaletteoraccentPalette?arshabh commentedon Mar 31, 2015
@dpipkin it is on
backgroundPaletteaneurysmjs commentedon Mar 31, 2015
backgroundPalette :)
ppkn commentedon Mar 31, 2015
Awesome! Thank you.
The hacky way that I made it work:
I hope that isn't too roundabout.
rschmukler commentedon Apr 2, 2015
@dpipkin that is the proper way to achieve this. Waiting on #1950 to see if a clearer way emerges from it.
Closing this issue for now, but follow #1950 to see a potential enhancement
fix(theming): add support for background hues