9292 }
9393
9494 @if $alpha > 0 {
95- @return eccgui-color-mix ($color 100% * $alpha , transparent );
95+ @if math .is-unitless ($alpha ) {
96+ $alpha : 100% * $alpha ;
97+ }
98+
99+ @return eccgui-color-mix ($color $alpha , transparent );
96100 } @else {
97101 // workaround: we need to prevent `0%` because it will reduced to `0` by some CSS minifiers and leads to invalid color-mix values
98102 @return eccgui-color-mix ($color , transparent 100% );
102106$debug-rgba-values : " yes" ;
103107
104108/* *
109+ * Overwrite SCSS built-in rgba function
110+ * TODO: we need to check if this is future proof, maybe this behaviour is not planned by Dart Sass library.
105111 * Split between rgba(red, green, blue, alpha) and rgba(color, alpha).
106112 */
107113@function rgba ($r , $g , $b : " undefined" , $a : 1 ) {
@@ -113,15 +119,14 @@ $debug-rgba-values: "yes";
113119 } @else {
114120 // rgba(r, g, b, a) is used -> rgb(r g b / a)
115121 // @see https://developer.mozilla.org/de/docs/Web/CSS/color_value/rgb
116- $color-new-notation : rgb ( #{ $r } #{ $g } #{ $b } / #{ $a } ) ;
122+ $color-new-notation : #{ " rgb( " + $r + " " + $g + " " + $b + " / " + $a + " ) " } ;
117123
118124 @return $color-new-notation ;
119125 }
120126}
121127
122128/* *
123- * Overwrite SCSS built-in rgba function to support colors by custom properties and CSS color methods.
124- * TODO: we need to check if this is future proof, maybe this bahaviour is not planned by Dart Sass library.
129+ * Support colors by custom properties and CSS color methods.
125130 */
126131@function rgba-extended ($color , $alpha ) {
127132 @if meta .type-of ($color ) == " color" {
0 commit comments