Skip to content

Commit 34b46b1

Browse files
committed
fix: respect opacity in color utils
1 parent 8b096e6 commit 34b46b1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

projects/material-css-vars/src/lib/_public-util.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@
2929
}
3030
}
3131

32-
@return map_get($palette_, $hue);
32+
$color: map_get($palette_, $hue);
3333

34+
@if (type-of($opacity) == number) {
35+
@return rgba($color, $opacity);
36+
} @else {
37+
@return rgb($color);
38+
}
3439
}
3540

3641
@function mat-css-color-primary($hue: 500, $opacity: null) {

0 commit comments

Comments
 (0)