vertical-center
Vertically center an element
| Parameter | Type | Description |
|---|---|---|
$position | string | Either relative (default) or absolute |
Example
Components/ExampleComponent/_style.scss
.m-example-component {
@include vertical-center($position: absolute);
}
dist/frontend.css
.m-example-component {
position: absolute;
top: 50%;
transform: translateY(-50%);
}