Order
Order utilities to arrange flex or grid containers with module mixins for responsive modifiers.
Examples
.order-0 {
order: 0;
}
.order-1 {
order: 1;
}
.order-2 {
order: 2;
}
.order-3 {
order: 3;
}
.order-4 {
order: 4;
}
.order-5 {
order: 5;
}
Responsive mixins
Responsive modifier mixins are also provided with no pre-defined breakpoints so they can be included as modules with custom SCSS breakpoints, or alternatively enabled in the breakpoints included with the framework (see below). The following demonstrates the static and responsive names for the .order-1
utility.
.order-1
.order-1-xl
.order-1-lg
.order-1-md
.order-1-sm
.order-1-xs
Using the module
Add the sassmods.scss
to your custom styles as below then include the Sass mixin(s) anywhere below.
custom.scss
@use "sassmods/scss/sassmods" as *;
@include order-css;
// Example breakpoint
@media (max-width: 480px) {
@include order-sm-css;
}
Source
_order.scss
// ------------------------------------------------------------
// Order
// ------------------------------------------------------------
@mixin order-css {
.order-0 {
order: 0;
}
.order-1 {
order: 1;
}
.order-2 {
order: 2;
}
.order-3 {
order: 3;
}
.order-4 {
order: 4;
}
.order-5 {
order: 5;
}
}
@mixin order-xl-css {
.order-0-xl {
order: 0;
}
.order-1-xl {
order: 1;
}
.order-2-xl {
order: 2;
}
.order-3-xl {
order: 3;
}
.order-4-xl {
order: 4;
}
.order-5-xl {
order: 5;
}
}
@mixin order-lg-css {
.order-0-lg {
order: 0;
}
.order-1-lg {
order: 1;
}
.order-2-lg {
order: 2;
}
.order-3-lg {
order: 3;
}
.order-4-lg {
order: 4;
}
.order-5-lg {
order: 5;
}
}
@mixin order-md-css {
.order-0-md {
order: 0;
}
.order-1-md {
order: 1;
}
.order-2-md {
order: 2;
}
.order-3-md {
order: 3;
}
.order-4-md {
order: 4;
}
.order-5-md {
order: 5;
}
}
@mixin order-sm-css {
.order-0-sm {
order: 0;
}
.order-1-sm {
order: 1;
}
.order-2-sm {
order: 2;
}
.order-3-sm {
order: 3;
}
.order-4-sm {
order: 4;
}
.order-5-sm {
order: 5;
}
}
@mixin order-xs-css {
.order-0-xs {
order: 0;
}
.order-1-xs {
order: 1;
}
.order-2-xs {
order: 2;
}
.order-3-xs {
order: 3;
}
.order-4-xs {
order: 4;
}
.order-5-xs {
order: 5;
}
}