Customization
The following table lists the available variables for customizing the Material theme.
Variables
Common
Name | Type | Default value | Computed value |
---|---|---|---|
$border-radius | 2px | 2px | |
Description Border radius for all components. | |||
$base-bg | map-get( $theme, base-bg ) | map-get( $theme, base-bg ) | |
Description The background of the components' chrome area. | |||
$base-text | map-get($theme, component-text) | map-get($theme, component-text) | |
Description The text color of the components' chrome area. | |||
$base-border | rgba( if($theme-type == dark, white, black), .08 ) | rgba( if($theme-type == dark, white, black), .08 ) | |
Description The border of the components' chrome area. | |||
$base-gradient | null | null | |
Description The gradient background of the components' chrome area. | |||
$hovered-bg | map-get( $theme, hover-bg ) | map-get( $theme, hover-bg ) | |
Description The background of hovered items. | |||
$hovered-text | $base-text | map-get($theme, component-text) | |
Description The text color of hovered items. | |||
$hovered-border | rgba( if($theme-type == dark, white, black), .15 ) | rgba( if($theme-type == dark, white, black), .15 ) | |
Description The border color of hovered items. | |||
$hovered-gradient | null | null | |
Description The gradient background of hovered items. | |||
$selected-bg | $secondary | material-color( $secondary-palette, default ) | |
Description The background of selected items. | |||
$selected-text | $secondary-contrast | material-color( $secondary-palette, default-contrast ) | |
Description The text color of selected items. | |||
$selected-border | rgba( if($theme-type == dark, white, black), .1 ) | rgba( if($theme-type == dark, white, black), .1 ) | |
Description The border color of selected items. | |||
$selected-gradient | null | null | |
Description The gradient background of selected items. |
Buttons
Name | Type | Default value | Computed value |
---|---|---|---|
$button-border-width | 0px | 0px | |
Description Width of border around buttons | |||
$button-border-radius | $border-radius | 2px | |
Description Border radius of buttons | |||
$button-padding-x | $padding-x | ||
Description Horizontal padding of buttons | |||
$button-padding-y | 8px | 8px | |
Description Vertical padding of buttons | |||
$button-bg | $base-bg | map-get( $theme, base-bg ) | |
Description The background of the buttons. | |||
$button-text | $base-text | map-get($theme, component-text) | |
Description The text color of the buttons. | |||
$button-border | $button-bg | map-get( $theme, base-bg ) | |
Description The border color of the buttons. | |||
$button-gradient | null | null | |
Description The background gradient of the buttons. | |||
$button-hovered-bg | true-mix( $button-text, $button-bg, 12%) | true-mix( $button-text, $button-bg, 12%) | |
Description The background of hovered buttons. | |||
$button-hovered-text | null | null | |
Description The text color of hovered buttons. | |||
$button-hovered-border | $button-hovered-bg | true-mix( $button-text, $button-bg, 12%) | |
Description The border color of hovered buttons. | |||
$button-hovered-gradient | null | null | |
Description The background gradient of hovered buttons. | |||
$button-pressed-bg | true-mix( $button-text, $button-bg, 12%) | true-mix( $button-text, $button-bg, 12%) | |
Description The background color of pressed buttons. | |||
$button-pressed-text | null | null | |
Description The text color of pressed buttons. | |||
$button-pressed-border | $button-pressed-bg | true-mix( $button-text, $button-bg, 12%) | |
Description The border color of pressed buttons. | |||
$button-pressed-gradient | null | null | |
Description The background gradient of pressed buttons. | |||
$button-focused-shadow | null | null | |
Description The shadow of focused buttons. |
Charts
Name | Type | Default value | Computed value |
---|---|---|---|
$series-a | get-base-hue( teal, 500 ) | get-base-hue( teal, 500 ) | |
Description The first base series color and its light and dark shades. | |||
$series-b | get-base-hue( blue, 500 ) | get-base-hue( blue, 500 ) | |
Description The second base series color and its light and dark shades. | |||
$series-c | get-base-hue( purple, 500 ) | get-base-hue( purple, 500 ) | |
Description The third base series color and its light and dark shades. | |||
$series-d | get-base-hue( red, 500 ) | get-base-hue( red, 500 ) | |
Description The fourth base series color and its light and dark shades. | |||
$series-e | get-base-hue( yellow, 500 ) | get-base-hue( yellow, 500 ) | |
Description The fifth base series color and its light and dark shades. | |||
$series-f | get-base-hue( green, 500 ) | get-base-hue( green, 500 ) | |
Description The sixth base series color and its light and dark shades. | |||
$series-1 | $series-a | get-base-hue( teal, 500 ) | |
Description The series colors in order: base, light, dark, lighter, darker | |||
$chart-major-lines | rgba(0, 0, 0, .08) | rgba(0, 0, 0, .08) | |
Description The color of the Chart grid lines (major). | |||
$chart-minor-lines | rgba(0, 0, 0, .04) | rgba(0, 0, 0, .04) | |
Description The color of the Chart grid lines (minor). |
Color System
Name | Type | Default value | Computed value |
---|---|---|---|
$primary | Color | material-color( $primary-palette, default ) | material-color( $primary-palette, default ) |
Description The color that focuses the user attention. Used for primary buttons and for elements of primary importance across the theme. | |||
$primary-contrast | Color | material-color( $primary-palette, default-contrast ) | material-color( $primary-palette, default-contrast ) |
Description The color used along with the primary color denoted by $primary. Used to provide contrast between the background and foreground colors. | |||
$secondary | Color | material-color( $secondary-palette, default ) | material-color( $secondary-palette, default ) |
Description The secondary color of the theme. | |||
$secondary-contrast | Color | material-color( $secondary-palette, default-contrast ) | material-color( $secondary-palette, default-contrast ) |
Description The color used along with the secondary color denoted by $secondary. Used to provide contrast between the background and foreground colors. | |||
$tertiary | Color | material-color($tertiary-palette, default) | material-color($tertiary-palette, default) |
Description The tertiary color of the theme. | |||
$tertiary-contrast | Color | material-color($tertiary-palette, default-contrast) | material-color($tertiary-palette, default-contrast) |
Description The color used along with the tertiary color denoted by $tertiary. Used to provide contrast between the background and foreground colors. | |||
$info | Color | #0058e9 | #0058e9 |
Description The color for informational messages and states. | |||
$success | Color | #37b400 | #37b400 |
Description The color for success messages and states. | |||
$warning | Color | #ffc000 | #ffc000 |
Description The color for warning messages and states. | |||
$error | Color | #f31700 | #f31700 |
Description The color for error messages and states. | |||
$dark | Color | get-base-hue( grey, 800 ) | get-base-hue( grey, 800 ) |
Description The dark color of the theme. | |||
$light | Color | get-base-hue( grey, 100 ) | get-base-hue( grey, 100 ) |
Description The light color of the theme. | |||
$inverse | if( $is-dark-theme, $light, $dark ) | if( $is-dark-theme, $light, $dark ) | |
Description Inverse color of the theme. Depending on the theme luminance dark or lught, it will be light or dark |
Component
Name | Type | Default value | Computed value |
---|---|---|---|
$component-bg | map-get($theme, component-bg) | map-get($theme, component-bg) | |
Description Background color of a component. Note: do not use this variable directly. Instead derive it as `$component-name-bg` e.g. `$grid-bg: $component-bg !defualt;`. | |||
$component-text | map-get($theme, component-text) | map-get($theme, component-text) | |
Description Text color of a component. Note: do not use this variable directly. Instead derive it as `$component-name-text` e.g. `$grid-text: component-text !default;`. | |||
$component-border | map-get($theme, component-border) | map-get($theme, component-border) | |
Description Border color of a component. Note: do not use this variable directly. Instead derive it as `$component-name-border` e.g. `$grid-border: component-border !default;`. | |||
$widget-bg | $component-bg | map-get($theme, component-bg) | |
Deprecated Will be removed in v5. Use `$component-bg` variable instead. Description Background color of a component. | |||
$widget-text | $component-text | map-get($theme, component-text) | |
Deprecated Will be removed in v5. Use `$component-text` variable instead. Description Text color of a component. | |||
$widget-border | $component-border | map-get($theme, component-border) | |
Deprecated Will be removed in v5. Use `$component-border` variable instead. Description Border color of a component. |
Grid
Name | Type | Default value | Computed value |
---|---|---|---|
$grid-bg | $component-bg | map-get($theme, component-bg) | |
Description Background color of the grid component | |||
$grid-text | $component-text | map-get($theme, component-text) | |
Description Text color of the grid component | |||
$grid-border | $component-border | map-get($theme, component-border) | |
Description Border color of the grid component | |||
$grid-header-bg | transparent | transparent | |
Description Background color of grid header | |||
$grid-header-text | if($theme-type == dark, $light-secondary-text, $dark-secondary-text) | if($theme-type == dark, $light-secondary-text, $dark-secondary-text) | |
Description Background color of grid header | |||
$grid-header-border | $grid-border | map-get($theme, component-border) | |
Description Border color of grid header | |||
$grid-header-gradient | null | null | |
Description Background gradient of grid header | |||
$grid-footer-bg | $grid-header-bg | transparent | |
Description Background color of grid footer | |||
$grid-footer-text | $grid-header-text | if($theme-type == dark, $light-secondary-text, $dark-secondary-text) | |
Description Text color of grid footer | |||
$grid-footer-border | $grid-header-border | map-get($theme, component-border) | |
Description Border color of grid footer | |||
$grid-alt-bg | transparent | transparent | |
Description Background color of alternating rows in grid | |||
$grid-alt-text | null | null | |
Description Text color of alternating rows in grid | |||
$grid-alt-border | null | null | |
Description Text color of alternating rows in grid | |||
$grid-hovered-bg | rgba( contrast-wcag( $grid-bg ), .07 ) | rgba( contrast-wcag( $grid-bg ), .07 ) | |
Description Background color of hovered rows in grid | |||
$grid-hovered-text | $grid-text | map-get($theme, component-text) | |
Description Text color of hovered rows in grid | |||
$grid-hovered-border | $grid-border | map-get($theme, component-border) | |
Description Border color of hovered rows in grid | |||
$grid-selected-bg | rgba( contrast-wcag( $grid-bg ), .04 ) | rgba( contrast-wcag( $grid-bg ), .04 ) | |
Description Background color of selected rows in grid | |||
$grid-selected-text | #000000 | #000000 | |
Description Text color of selected rows in grid | |||
$grid-selected-border | $grid-border | map-get($theme, component-border) | |
Description Border color of selected rows in grid |
Icons
Name | Type | Default value | Computed value |
---|---|---|---|
$icon-font-url | null | null | |
Description The URL to the icon font that will be used by the theme The default value of `null` embeds the package font with a `data:` URL |
Shadows
Name | Type | Default value | Computed value |
---|---|---|---|
$elevation | map-get( $theme, elevation ) | map-get( $theme, elevation ) | |
Description Color of shadows | |||
$box-shadow-depth-1 | 0 2px 1px -1px rgba( $elevation, .2 ), 0 1px 1px 0 rgba( $elevation, .14 ), 0 1px 3px 0 rgba( $elevation, .12 ) | 0 2px 1px -1px rgba( $elevation, .2 ), 0 1px 1px 0 rgba( $elevation, .14 ), 0 1px 3px 0 rgba( $elevation, .12 ) | |
Description Shadow for switch. Equivalent to material elevation 1. | |||
$box-shadow-depth-2 | 0 3px 1px -2px rgba( $elevation, .2 ), 0 2px 2px 0 rgba( $elevation, .14 ), 0 1px 5px 0 rgba( $elevation, .12 ) | 0 3px 1px -2px rgba( $elevation, .2 ), 0 2px 2px 0 rgba( $elevation, .14 ), 0 1px 5px 0 rgba( $elevation, .12 ) | |
Description Shadow for resting state of button, card and other widgets. Equivalent to material elevation 2. | |||
$box-shadow-depth-3 | 0 5px 5px -3px rgba( $elevation, .2 ), 0 8px 10px 1px rgba( $elevation, .14 ), 0 3px 14px 2px rgba( $elevation, .12 ) | 0 5px 5px -3px rgba( $elevation, .2 ), 0 8px 10px 1px rgba( $elevation, .14 ), 0 3px 14px 2px rgba( $elevation, .12 ) | |
Description Shadow for menu, popups and raised state of button and card. Equivalent to material elevation 8. | |||
$box-shadow-depth-4 | 0 8px 10px -5px rgba( $elevation, .2 ), 0 16px 24px 2px rgba( $elevation, .14 ), 0 6px 30px 5px rgba( $elevation, .12 ) | 0 8px 10px -5px rgba( $elevation, .2 ), 0 16px 24px 2px rgba( $elevation, .14 ), 0 6px 30px 5px rgba( $elevation, .12 ) | |
Description Shadow for drawers and other overlaying elements. Equivalent to material elevation 16. | |||
$box-shadow-depth-5 | 0 11px 15px -7px rgba( $elevation, .2 ), 0 24px 38px 3px rgba( $elevation, .14 ), 0 9px 46px 8px rgba( $elevation, .12 ) | 0 11px 15px -7px rgba( $elevation, .2 ), 0 24px 38px 3px rgba( $elevation, .14 ), 0 9px 46px 8px rgba( $elevation, .12 ) | |
Description Shadow for window and dialog. Equivalent to material elevation 24. |
Tabstrip
Name | Type | Default value | Computed value |
---|---|---|---|
$tabstrip-bg | null | null | |
Description Background color of tabstrip component | |||
$tabstrip-text | inherit | inherit | |
Description Text color of tabstrip component | |||
$tabstrip-border | $component-border | map-get($theme, component-border) | |
Description Border color of tabstrip component | |||
$tabstrip-item-padding-x | 24px | 24px | |
Description Horizontal padding of tabs | |||
$tabstrip-item-padding-y | 14px | 14px | |
Description Vertical padding of tabs | |||
$tabstrip-item-border-width | 0px | 0px | |
Description Width of border around of tabs | |||
$tabstrip-item-border-radius | 0px | 0px | |
Description Border radius of tabs | |||
$tabstrip-item-gap | 0px | 0px | |
Description Spacing between tabs | |||
$tabstrip-item-bg | null | null | |
Description Background color of tabs | |||
$tabstrip-item-text | inherit | inherit | |
Description Text color of tabs | |||
$tabstrip-item-border | null | null | |
Description Border color of tabs | |||
$tabstrip-item-gradient | null | null | |
Description Background gradient of tabs | |||
$tabstrip-item-hovered-bg | null | null | |
Description Background color of hovered tabs | |||
$tabstrip-item-hovered-text | inherit | inherit | |
Description Text color of hovered tabs | |||
$tabstrip-item-hovered-border | null | null | |
Description Border color of hovered tabs | |||
$tabstrip-item-hovered-gradient | null | null | |
Description Background gradent of hovered tabs | |||
$tabstrip-item-selected-bg | null | null | |
Description Background color of selected tabs | |||
$tabstrip-item-selected-text | inherit | inherit | |
Description Text color of selected tabs | |||
$tabstrip-item-selected-border | null | null | |
Description Border color of selected tabs | |||
$tabstrip-item-selected-gradient | null | null | |
Description Background gradient of selected tabs | |||
$tabstrip-content-padding-x | $tabstrip-item-padding-x | 24px | |
Description Horizontal padding of tabstrip content | |||
$tabstrip-content-padding-y | $tabstrip-item-padding-y | 14px | |
Description Vertical padding of tabstrip content | |||
$tabstrip-content-border-width | 0px | 0px | |
Description Width of border around tabstrip content | |||
$tabstrip-content-bg | transparent | transparent | |
Description Background color of tabstrip content | |||
$tabstrip-content-text | inherit | inherit | |
Description Text color of tabstrip content | |||
$tabstrip-content-border | transparent | transparent | |
Description Border color of tabstrip content |
Toolbar
Name | Type | Default value | Computed value |
---|---|---|---|
$toolbar-padding-x | 6px | 6px | |
Description The horizontal padding of the container. | |||
$toolbar-padding-y | 6px | 6px | |
Description The vertical padding of the container. |
Typography
Name | Type | Default value | Computed value |
---|---|---|---|
$font-size | 14px | 14px | |
Description Base font size across all components. | |||
$font-family | Roboto, "Helvetica Neue", sans-serif | Roboto, "Helvetica Neue", sans-serif | |
Description Font family across all components. | |||
$font-family-monospace | Consolas, "Ubuntu Mono", "Lucida Console", "Courier New", monospace | Consolas, "Ubuntu Mono", "Lucida Console", "Courier New", monospace | |
Description Font family for monospaced text. Used for styling the code. | |||
$line-height | (28 / 14) | (28 / 14) | |
Description Line height used along with $font-size. |