Sizer

Arguments

NameTypeDescription
$widthnumber (with unit),
string

Sets the width of the selected element(s).

$heightnumber (with unit),
string

Sets the height of the selected element(s). The default value is set to $width value.

Examples

Call the mixin to adjust the $width and the $height of an element.

.element{
  @include sizer(200px);
}
//CSS Output
.element {
  width: 200px;
  height: 200px;
}

To assign different values ​​to the width and height properties of an element, do the following:

.element{
  @include sizer(500px, 100px);
}
//CSS Output
.element {
  width: 500px;
  height: 100px;
}

You can pass string values as well!

.element{
  @include sizer(400px, auto);
}
//CSS Output
.element {
  width: 400px;
  height: auto;
}