-
sass – 2 colors gradient mixin with fallback
[crayon-6425721d657bd257683876/] Don’t use mix($c, $c2) to get the middle color! It will only retrun ($c1 + $c2) / 2, not the middle color. Sadly, I failed to put color stop percentage in the mixin. Only if sass rgb() could return a color(e.g. #fff) from a string(e.g. “#fff 10%”).