Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. $space-base: 8px;
  2. $space-1: $space-base * 1;
  3. $space-2: $space-base * 2;
  4. $space-3: $space-base * 3;
  5. $space-4: $space-base * 4;
  6. $space-5: $space-base * 5;
  7. $space-6: $space-base * 6;
  8. $space-7: $space-base * 7;
  9. $space-8: $space-base * 8;
  10.  
  11. $sizeMap: (
  12. 1: $space-1,
  13. 2: $space-2,
  14. 3: $space-3,
  15. 4: $space-4,
  16. 5: $space-5,
  17. 6: $space-6,
  18. 7: $space-7,
  19. 8: $space-8
  20. );
  21.  
  22. @each $key, $val in $sizeMap {
  23. .m {
  24. &-#{$key} {
  25. margin: $val;
  26. }
  27. &t-#{$key} {
  28. margin-top: $val;
  29. }
  30. &r-#{$key} {
  31. margin-right: $val;
  32. }
  33. &b-#{$key} {
  34. margin-bottom: $val;
  35. }
  36. &l-#{$key} {
  37. margin-left: $val;
  38. }
  39. &x-#{$key} {
  40. margin: 0 $val;
  41. }
  42. &y-#{$key} {
  43. margin: $val 0;
  44. }
  45. }
  46.  
  47. .p {
  48. &-#{$key} {
  49. padding: $val;
  50. }
  51. &t-#{$key} {
  52. padding-top: $val;
  53. }
  54. &r-#{$key} {
  55. padding-right: $val;
  56. }
  57. &b-#{$key} {
  58. padding-bottom: $val;
  59. }
  60. &l-#{$key} {
  61. padding-left: $val;
  62. }
  63. &x-#{$key} {
  64. padding: 0 $val;
  65. }
  66. &y-#{$key} {
  67. padding: $val 0;
  68. }
  69. }
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement