@use "../variables";

// stylelint-disable declaration-no-important

// Common values
@each $position in variables.$positions {
    .position-#{$position} {
        position: $position !important;
    }
}

@each $name, $value in variables.$zindex-levels {
    .z-#{$name} {
        z-index: $value !important;
    }
}

// Shorthand

.fixed-top {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: variables.$zindex-fixed;
}

.fixed-bottom {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: variables.$zindex-fixed;
}

.sticky-top {
    @supports (position: sticky) {
        position: sticky;
        top: 0;
        z-index: variables.$zindex-sticky;
    }
}
