While not a part of OUDS Web’s grid system, z-indexes play an important part in how our components overlay and interact with one another.

Several OUDS Web components utilize z-index, the CSS property that helps control layout by providing a third axis to arrange content.

These higher values start at an arbitrary number, high and specific enough to ideally avoid conflicts. We need a standard set of these across our layered components. There’s no reason we couldn’t have used 100+ or 500+.

We don’t encourage customization of these individual values; should you change one, you likely need to change them all.

$zindex-dropdown:                   1000;
$zindex-sticky:                     1020;
$zindex-fixed:                      1030;
$zindex-back-to-top:                1035; // OUDS mod
$zindex-offcanvas-backdrop:         1040;
$zindex-offcanvas:                  1045;
$zindex-modal-backdrop:             1050;
$zindex-modal:                      1055;
$zindex-popover:                    1070;
$zindex-tooltip:                    1080;
$zindex-toast:                      1090;

To handle overlapping borders, we use low single digit z-index values.