_radial-positions-parser.scss 484 B

123456789101112131415161718
  1. @function _radial-positions-parser($gradient-pos) {
  2. $shape-size: nth($gradient-pos, 1);
  3. $pos: nth($gradient-pos, 2);
  4. $shape-size-spec: _shape-size-stripper($shape-size);
  5. $pre-spec: unquote(if($pos, "#{$pos}, ", null))
  6. unquote(if($shape-size, "#{$shape-size},", null));
  7. $pos-spec: if($pos, "at #{$pos}", null);
  8. $spec: "#{$shape-size-spec} #{$pos-spec}";
  9. // Add comma
  10. @if ($spec != ' ') {
  11. $spec: "#{$spec},"
  12. }
  13. @return $pre-spec $spec;
  14. }