PageRenderTime 21ms CodeModel.GetById 13ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/blogen/scss/bootstrap/utilities/_position.scss

https://bitbucket.org/Trulsh/personal-bootstrap-projects
Sass | 36 lines | 25 code | 7 blank | 4 comment | 0 complexity | fbee79568d6d418b3cfe3e20c2d1849b MD5 | raw file
 1// stylelint-disable declaration-no-important
 2
 3// Common values
 4
 5// Sass list not in variables since it's not intended for customization.
 6$positions: static, relative, absolute, fixed, sticky;
 7
 8@each $position in $positions {
 9  .position-#{$position} { position: $position !important; }
10}
11
12// Shorthand
13
14.fixed-top {
15  position: fixed;
16  top: 0;
17  right: 0;
18  left: 0;
19  z-index: $zindex-fixed;
20}
21
22.fixed-bottom {
23  position: fixed;
24  right: 0;
25  bottom: 0;
26  left: 0;
27  z-index: $zindex-fixed;
28}
29
30.sticky-top {
31  @supports (position: sticky) {
32    position: sticky;
33    top: 0;
34    z-index: $zindex-sticky;
35  }
36}