#StackBounty: #angular #sass #themes #angular-material How can I use Material Theme colors for custom things?

Bounty: 50

I’m am guessing from the down votes that I’m doing something very wrong, but I would appreciate some more info 🙁

I’m trying to use a (background) color from my theme to make something else that color (a part of a custom angular component with it’s own .scss file)

What is the designed way to do that?

For example,
Is there a way to say this element should use the current theme’s -> background -> disabled color? etc

Thanks in advance for any direction you can give me!!

I’m sorry if I’m asking this incorrectly, but I am not sure why I am getting downvotes, any help will be appreciated!!

I would like to do this:
1) to keep everything consistent
2) to be able to switch themes easily

my custom components have their own .scss files, and I would like them to somehow be able to reference (override) their default colors with colors/palettes from my themes..

If I can help it, I do not want to use scss color variables in the component .scss files, because then it’s harder to swap themes. I would like the custom components to somehow reference whatever the current theme’s xxx color is.
(and all that information is in a separate .scss file)

I haven’t used a mixin before but maybe that’s what I need?

Thanks!


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.