mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-29 16:19:53 +02:00
Responsive sticky top (#29158)
This commit is contained in:
committed by
XhmikosR
parent
49469ca0dc
commit
d99ff902f8
@@ -18,10 +18,17 @@
|
||||
z-index: $zindex-fixed;
|
||||
}
|
||||
|
||||
.sticky-top {
|
||||
@supports (position: sticky) {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: $zindex-sticky;
|
||||
// Responsive sticky top
|
||||
@supports (position: sticky) {
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
||||
|
||||
.sticky#{$infix}-top {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: $zindex-sticky;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user