0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-23 20:54:22 +01:00
Bootstrap/scss/helpers/_position.scss

41 lines
774 B
SCSS
Raw Normal View History

2024-07-29 22:04:11 -07:00
@use "sass:map";
@use "../mixins/breakpoints";
@use "../variables";
// Shorthand
.fixed-top {
position: fixed;
top: 0;
right: 0;
left: 0;
2024-07-29 22:04:11 -07:00
z-index: variables.$zindex-fixed;
}
.fixed-bottom {
position: fixed;
right: 0;
bottom: 0;
left: 0;
2024-07-29 22:04:11 -07:00
z-index: variables.$zindex-fixed;
}
// Responsive sticky top and bottom
2024-07-29 22:04:11 -07:00
@each $breakpoint in map.keys(variables.$grid-breakpoints) {
@include breakpoints.media-breakpoint-up($breakpoint) {
$infix: breakpoints.breakpoint-infix($breakpoint, variables.$grid-breakpoints);
2019-09-13 23:15:20 +05:00
.sticky#{$infix}-top {
position: sticky;
top: 0;
2024-07-29 22:04:11 -07:00
z-index: variables.$zindex-sticky;
2019-09-13 23:15:20 +05:00
}
.sticky#{$infix}-bottom {
position: sticky;
bottom: 0;
2024-07-29 22:04:11 -07:00
z-index: variables.$zindex-sticky;
}
2017-06-17 10:14:45 -07:00
}
}