Skip to content

Commit f49171b

Browse files
committed
fix rgba signature splitting
1 parent d207cfb commit f49171b

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/common/scss/_color-functions.scss

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,15 @@ $debug-rgba-values: "yes";
9696
*/
9797
@function rgba($r, $g, $b: "undefined", $a: 1) {
9898
// check if old notation is used
99-
@if meta.variable-exists("r") && meta.variable-exists("g") && $b == "undefined" {
99+
@if meta.variable-exists("r") and meta.variable-exists("g") and $b == "undefined" {
100100
// rgba(color, alpha) was used
101101
// forward to our color check splitter
102-
// @debug ("rgba input: #{$r} #{$g}"); // looks like the signature r,g,b,a always get transformed to color,alpha
103102
@return rgba-extended($r, $g);
104103
} @else {
105-
// rgba(r, g, b, a) is used
106-
// should never trigger because of the magical transformation
104+
// rgba(r, g, b, a) is used -> rgb(r g b / a)
105+
// @see https://developer.mozilla.org/de/docs/Web/CSS/color_value/rgb
107106
$color-new-notation: rgb(#{$r} #{$g} #{$b} / #{$a});
108107

109-
@error "Old color notation found -> use #{$color-new-notation}";
110108
@return $color-new-notation;
111109
}
112110
}

0 commit comments

Comments
 (0)