aboutsummaryrefslogtreecommitdiff
path: root/scss/helpers
diff options
context:
space:
mode:
authorjahanzaibsuleman07 <[email protected]>2019-09-13 23:15:20 +0500
committerXhmikosR <[email protected]>2019-09-13 21:15:20 +0300
commitd99ff902f8c7b849ccb283af69d6a8ac15356450 (patch)
tree7b34591ae35affbfc5155a587c7f63dad5f7af4d /scss/helpers
parent49469ca0dc383626b201d91b66bd4aaed8dceb0f (diff)
downloadbootstrap-d99ff902f8c7b849ccb283af69d6a8ac15356450.tar.xz
bootstrap-d99ff902f8c7b849ccb283af69d6a8ac15356450.zip
Responsive sticky top (#29158)
Diffstat (limited to 'scss/helpers')
-rw-r--r--scss/helpers/_position.scss17
1 files changed, 12 insertions, 5 deletions
diff --git a/scss/helpers/_position.scss b/scss/helpers/_position.scss
index e0c4c2c11..63fe4504a 100644
--- a/scss/helpers/_position.scss
+++ b/scss/helpers/_position.scss
@@ -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;
+ }
+ }
}
}