Angular Material2 theming - how to set app background?

后端 未结 10 1638
别那么骄傲
别那么骄傲 2020-12-04 14:24

I am building an angular2 app using angular material2. I am trying to set the background of my application \"the correct way\", but I can\'t figure out how.

I found

10条回答
  •  抹茶落季
    2020-12-04 15:03

    I would suggest that you declare a background colour in a variables file (assuming you're using sass) then simply import it where needed. For example:-

    @import '../config/variables';
    
    body {
        height: 100%;
        margin: 0;
        background-color: $brand-primary;
    }
    

提交回复
热议问题