=background($values...) $background-values: () @each $value in $values $background-value: () $background-color: () $background-image: () $background-gradient: () $background-position: () $background-repeat: () $background-attachment: () $background-size: () $background-clip: () @each $property in $value @if background_color($property) $background-color: $property @else if background_image($property) $background-image: $property @else if background_gradient($property) $background-gradient: $property @else if background_position($property) $background-position: $property @else if background_repeat($property) $background-repeat: $property @else if background_attachment($property) $background-attachment: $property @else if background_size($property) $background-size: background_size_value($property) @else if background_clip($property) $background-clip: $property @if background-size != () and $background-position == () $background-position: (left top) $background-value: $background-color $background-image $background-gradient $background-position $background-size $background-repeat $background-attachment $background-clip $background-values: append($background-values, $background-value, comma) background: $background-values