@function colorAlpha($color, $opacity) {
  @return #{'rgb(from #{$color} r g b / #{$opacity})'};
}

@function spacing($top, $right: '', $bottom: '', $left: '') {
  @if ($right == '') {
    @return $top * $spacing;
  }

  @if ($bottom == '') {
    @return ($top * $spacing) ($right * $spacing);
  }

  @if ($left == '') {
    @return ($top * $spacing) ($right * $spacing) ($bottom * $spacing);
  }

  @return ($top * $spacing) ($right * $spacing) ($bottom * $spacing) ($left * $spacing);
}

@function transition($properties...) {
  $result: '';
  @each $property in $properties {
    @if ($result != '') {
      $result: $result + ', ';
    }

    $result: $result + $property + ' ' + $transition_parameters;
  }

  @return #{$result};
}
