_position.scss 614 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // stylelint-disable declaration-no-important
  2. // Common values
  3. // Sass list not in variables since it's not intended for customization.
  4. $positions: static, relative, absolute, fixed, sticky;
  5. @each $position in $positions {
  6. .position-#{$position} { position: $position !important; }
  7. }
  8. // Shorthand
  9. .fixed-top {
  10. position: fixed;
  11. top: 0;
  12. right: 0;
  13. left: 0;
  14. z-index: $zindex-fixed;
  15. }
  16. .fixed-bottom {
  17. position: fixed;
  18. right: 0;
  19. bottom: 0;
  20. left: 0;
  21. z-index: $zindex-fixed;
  22. }
  23. .sticky-top {
  24. @supports (position: sticky) {
  25. position: sticky;
  26. top: 0;
  27. z-index: $zindex-sticky;
  28. }
  29. }