Reputation: 2741
How to access certain SCSS variables in Angular-Material (Angular4)?
For example, the default toolbar has a CSS class as follow:
.mat-toolbar {
display: flex;
box-sizing: border-box;
width: 100%;
padding: 0 16px;
flex-direction: column;
}
I want to get the padding value, i.e. 16px
, store it as $fatty-padding
and then use it in my custom class, for example:
.custom-toolbar {
padding: $fatty-padding $fatty-padding;
margin: 0 $fatty-padding;
}
Is it possible?
Upvotes: 4
Views: 529
Reputation: 16402
Angular Material styles are written without variables:
So there is no easy way to get this styles and store to the variable in SCSS.
Upvotes: 1