material icon indicating copy to clipboard operation
material copied to clipboard

More of a question on theming

Open rwestonbutler opened this issue 11 years ago • 2 comments

Will we eventually be able to apply a theme to any element, even if the element isn't part of anuglar material AND keep it in sync with the current theme? There are certain situations where I'd like to color some elements, divs, etc.. and keep our theme in sync with the material themes. This may have been asked before, but i can't find it. Thanks for your time! Great work!

rwestonbutler avatar Jun 02 '15 02:06 rwestonbutler

Questions should be asked on the ng-material forums

Probably not because it needs to know css rules and elements that won't be in your custom elements.

You can solve this by creating a stylesheet for each theme you will use and manually style your controls. Then use md-theme-default (or md-theme-themename) as a prefix class. Use angular to switch the css class name based on the theme, using ng-class.

Perhaps you could write an attribute directive that you can attach to the element that uses the theme service.

It's not something that can easily be solved. If you look at the css rules, they are complex. Color and background color changes depending on where a component is placed (on a toolbar, md-card, md-list, etc).

For further discussion, create a topic on the forums.

ghost avatar Jun 05 '15 23:06 ghost

Gotcha. Thanks for your response. The attribute directive idea seems like a good place to start.

rwestonbutler avatar Jun 05 '15 23:06 rwestonbutler