padding

Shorthand for set nullable* padding properties.

*Some values can be omitted using null (preferable) or its alias n .

Arguments

NameTypeDefaultDescription
$values *listPadding values list in default order (top-right-bottom-left).

Example

@use 'more-sass' as more;

.element-one {
    @include more.padding(10px);
}

.element-two {
    @include more.padding(10px 20px 30px 40px); // or: @include more.padding(10px, 20px, 30px, 40px);
}

.element-three {
    @include more.padding(null auto);
}
.element-one {
    padding-top: 10px;
    padding-right: 10px;
    padding-bottom: 10px;
    padding-left: 10px;
}

.element-two {
    padding-top: 10px;
    padding-right: 20px;
    padding-bottom: 30px;
    padding-left: 40px;
}

.element-three {
    padding-right: auto;
    padding-left: auto;
}
Edit this page on GitHub Updated at Mon, Jan 30, 2023