fix(gtkalpha): return proper color object to unblock transparentize()

This commit is contained in:
Ivan Borakove
2025-06-04 18:06:13 -03:00
parent 1e0656208d
commit 9ef0aa9327

View File

@@ -1,7 +1,12 @@
@function gtkalpha($c,$a) {
@return unquote("alpha(#{$c},#{$a})");
@function gtkalpha($c, $a) {
@if type-of($c) == 'color' {
@return rgba($c, $a); // objeto-cor quando $c é cor Sass
}
@return unquote("rgba(#{$c}, #{$a})"); // string para currentColor etc.
}
@function gtkmix($c1,$c2,$r) {
$ratio: 1 - $r / 100%; // match SCSS gtkmix()
@return unquote("mix(#{$c1},#{$c2},#{$ratio})");