_spacings.scss 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Margin and Padding
  2. .m-x-auto {
  3. margin-right: auto !important;
  4. margin-left: auto !important;
  5. }
  6. @each $prop, $abbrev in (margin: m, padding: p) {
  7. @each $size, $lengths in $spacers {
  8. $length-x: map-get($lengths, x);
  9. $length-y: map-get($lengths, y);
  10. .#{$abbrev}-a-#{$size} {
  11. #{$prop}: $length-y $length-x !important;
  12. } // a = All sides
  13. .#{$abbrev}-t-#{$size} {
  14. #{$prop}-top: $length-y !important;
  15. }
  16. .#{$abbrev}-r-#{$size} {
  17. #{$prop}-right: $length-x !important;
  18. }
  19. .#{$abbrev}-b-#{$size} {
  20. #{$prop}-bottom: $length-y !important;
  21. }
  22. .#{$abbrev}-l-#{$size} {
  23. #{$prop}-left: $length-x !important;
  24. }
  25. // Axes
  26. .#{$abbrev}-x-#{$size} {
  27. #{$prop}-right: $length-x !important;
  28. #{$prop}-left: $length-x !important;
  29. }
  30. .#{$abbrev}-y-#{$size} {
  31. #{$prop}-top: $length-y !important;
  32. #{$prop}-bottom: $length-y !important;
  33. }
  34. }
  35. }
  36. // Positioning
  37. .pos-f-t {
  38. position: fixed;
  39. top: 0;
  40. right: 0;
  41. left: 0;
  42. z-index: $zindex-navbar-fixed;
  43. }