Last active
November 29, 2018 05:46
-
-
Save tomastrajan/ccdfff221313bb436d242fcb9b5b8ac9 to your computer and use it in GitHub Desktop.
Angular Material Theming - custom component theme
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import '~@angular/material/theming'; | |
// mixin name will be used in main style.scss | |
@mixin big-input-component-theme($theme) { | |
// retrieve variables from theme | |
// (all possible variables, use only what you really need) | |
$primary: map-get($theme, primary); | |
$accent: map-get($theme, accent); | |
$warn: map-get($theme, accent); | |
$foreground: map-get($theme, foreground); | |
$background: map-get($theme, background); | |
// all of these variables contain many additional variables | |
big-input { | |
input { | |
// retrieve particular color from variable, rg: text, base, divider, ... | |
color: mat-color($foreground, text); | |
background-color: mat-color($background, card); | |
// or use "default" subvariable by default, oh the puns :) | |
border: 1px solid mat-color($accent); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In _theming.scss file background color of status bar are define like this
$mat-light-theme-background: (
status-bar: map_get($mat-grey, 300),
..
)
$mat-dark-theme-background: (
status-bar: black,
..
)
I want to change the status bar color to white. How can I change it?
background-color: mat-color($background, status-bar);