"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/lib/core/theming/_theming.scss" between
material2-7.3.2.tar.gz and material2-7.3.3.tar.gz

About: material2 offers Material Design components for Angular.

_theming.scss  (material2-7.3.2):_theming.scss  (material2-7.3.3)
skipping to change at line 52 skipping to change at line 52
// be treated as opacity. // be treated as opacity.
// @param $opacity The alpha channel value for the color. // @param $opacity The alpha channel value for the color.
@function mat-color($palette, $hue: default, $opacity: null) { @function mat-color($palette, $hue: default, $opacity: null) {
// If hueKey is a number between zero and one, then it actually contains an // If hueKey is a number between zero and one, then it actually contains an
// opacity value, so recall this function with the default hue and that given opacity. // opacity value, so recall this function with the default hue and that given opacity.
@if type-of($hue) == number and $hue >= 0 and $hue <= 1 { @if type-of($hue) == number and $hue >= 0 and $hue <= 1 {
@return mat-color($palette, default, $hue); @return mat-color($palette, default, $hue);
} }
$color: map-get($palette, $hue); $color: map-get($palette, $hue);
$opacity: if($opacity == null, opacity($color), $opacity);
@return rgba($color, $opacity); @if (type-of($color) != color) {
// If the $color resolved to something different from a color (e.g. a CSS va
riable),
// we can't apply the opacity anyway so we return the value as is, otherwise
Sass can
// throw an error or output something invalid.
@return $color;
}
@return rgba($color, if($opacity == null, opacity($color), $opacity));
} }
// Creates a container object for a light theme to be given to individual compon ent theme mixins. // Creates a container object for a light theme to be given to individual compon ent theme mixins.
@function mat-light-theme($primary, $accent, $warn: mat-palette($mat-red)) { @function mat-light-theme($primary, $accent, $warn: mat-palette($mat-red)) {
@return ( @return (
primary: $primary, primary: $primary,
accent: $accent, accent: $accent,
warn: $warn, warn: $warn,
is-dark: false, is-dark: false,
foreground: $mat-light-theme-foreground, foreground: $mat-light-theme-foreground,
 End of changes. 2 change blocks. 
2 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)