_position.scss 674 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. // stylelint-disable-next-line scss/dollar-variable-default
  5. $positions: static, relative, absolute, fixed, sticky;
  6. @each $position in $positions {
  7. .position-#{$position} { position: $position !important; }
  8. }
  9. // Shorthand
  10. .fixed-top {
  11. position: fixed;
  12. top: 0;
  13. right: 0;
  14. left: 0;
  15. z-index: $zindex-fixed;
  16. }
  17. .fixed-bottom {
  18. position: fixed;
  19. right: 0;
  20. bottom: 0;
  21. left: 0;
  22. z-index: $zindex-fixed;
  23. }
  24. .sticky-top {
  25. @supports (position: sticky) {
  26. position: sticky;
  27. top: 0;
  28. z-index: $zindex-sticky;
  29. }
  30. }