Gerillass

v2.1.0

Shorthand Property

Type: Function
shorthandProperty();

Expands one to four values into the four-value CSS shorthand order.

Arguments

NameTypeDescription
$valuelistAccepts one to four values.

Examples

One to four values expanded to the full four-value shorthand.

Sass
.card {
  padding: shorthandProperty(16px 24px);
}
CSS
.card {
  padding: 16px 24px 16px 24px;
}

What it refuses

Arguments are checked, so a wrong value stops the build with a message instead of quietly producing the wrong CSS.

Sass
.card {
  padding: shorthandProperty(1px 2px 3px 4px 5px);
}
Error: You've passed 5 arguments. Please do not pass more than 4.