Flexbox & GridOrder

Order

Controls the order of flex and grid items.

ClassStyle
or-0order: 0;
or-1order: 1;
or-2order: 2;
or-3order: 3;
or-4order: 4;
or-5order: 5;
or-6order: 6;
or-7order: 7;
or-8order: 8;
or-9order: 9;
or-10order: 10;
or-lorder: -9999;
or-forder: 9999;

This example showcases various order utilities:

  • The or-l order utility sets the order property to -9999, placing the item at the beginning of the flex container.
  • The or-f order utility sets the order property to 9999, placing the item at the end of the flex container.
A
B
C
<div class="d-f jc-sb tc-white">
<div class="ai-c bg-indigo d-f d-16 jc-c or-f">A</div>
<div class="ai-c bg-indigo d-f d-16 jc-c">B</div>
<div class="ai-c bg-indigo d-f d-16 jc-c or-l">C</div>
</div>

Using utility variants

Learn how to override existing utilities based on the user's screen size or other factors, such as hover states.

Using media queries

You can combine responsive breakpoints like sm:or-*, md:or-*, lg:or-*, and xxl:or-* to allow targeting specific utilities in different viewports.

Using hover states

Alternatively, you can apply :hover by using h:or-* utility to override elements and change their values when hovering over them.