border-radius

Sets the values of the necessary rules of border-radius properties family.

Some values can be automatically set to 0 (zero) using null (preferable) or its alias n .

Arguments

NameTypeDefaultDescription
$value *list|stringProperty value.
$direction?stringnullThe keyword describing the list of properties to use.

List of direction keywords:

KeywordAffected properties
topborder-top-left-radius, border-top-right-radius
rightborder-top-right-radius, border-bottom-right-radius
bottomborder-bottom-right-radius, border-bottom-left-radius
leftborder-top-left-radius, border-bottom-left-radius
top-rightborder-top-right-radius
top-leftborder-top-left-radius
bottom-rightborder-bottom-right-radius
bottom-leftborder-bottom-left-radius
cross-leftborder-top-left-radius, border-bottom-right-radius
cross-rightborder-top-right-radius, border-bottom-left-radius
allborder-radius

Example

@use 'more-sass' as more;

.element-one {
    @include more.border-radius(1px 2px null 4px);
}

.element-two {
    @include more.border-radius(10px, 'cross-left');
}
.element-one {
    border-radius: 1px 2px 0 4px;
}

.element-two {
    border-top-left-radius: 10px;
    border-bottom-right-radius: 10px;
}
Edit this page on GitHub Updated at Mon, Jan 30, 2023