_utilities-spacing.scss 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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} { #{$prop}: $length-y $length-x !important; } // a = All sides
  11. .#{$abbrev}-t-#{$size} { #{$prop}-top: $length-y !important; }
  12. .#{$abbrev}-r-#{$size} { #{$prop}-right: $length-x !important; }
  13. .#{$abbrev}-b-#{$size} { #{$prop}-bottom: $length-y !important; }
  14. .#{$abbrev}-l-#{$size} { #{$prop}-left: $length-x !important; }
  15. // Axes
  16. .#{$abbrev}-x-#{$size} {
  17. #{$prop}-right: $length-x !important;
  18. #{$prop}-left: $length-x !important;
  19. }
  20. .#{$abbrev}-y-#{$size} {
  21. #{$prop}-top: $length-y !important;
  22. #{$prop}-bottom: $length-y !important;
  23. }
  24. }
  25. }
  26. // Positioning
  27. .pos-f-t {
  28. position: fixed;
  29. top: 0;
  30. right: 0;
  31. left: 0;
  32. z-index: $zindex-navbar-fixed;
  33. }