common.scss 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. $pos: (
  2. t: top,
  3. b: bottom,
  4. l: left,
  5. r: right
  6. );
  7. @for $i from 0 through 30 {
  8. @each $key, $value in $pos {
  9. .m#{$key}-#{$i * 2} {
  10. margin: {
  11. #{$value}: 2px * $i;
  12. }
  13. }
  14. .p#{$key}-#{$i * 2} {
  15. padding: {
  16. #{$value}: 2px * $i;
  17. }
  18. }
  19. }
  20. .mcol-#{$i * 2} {
  21. margin: {
  22. top: 2px * $i;
  23. bottom: 2px * $i;
  24. }
  25. }
  26. .mrow-#{$i * 2} {
  27. margin: {
  28. right: 2px * $i;
  29. left: 2px * $i;
  30. }
  31. }
  32. .m-#{$i * 2} {
  33. margin: 2px * $i;
  34. }
  35. .pcol-#{$i * 2} {
  36. padding: {
  37. top: 2px * $i;
  38. bottom: 2px * $i;
  39. }
  40. }
  41. .prow-#{$i * 2} {
  42. padding: {
  43. right: 2px * $i;
  44. left: 2px * $i;
  45. }
  46. }
  47. .p-#{$i * 2} {
  48. padding: 2px * $i;
  49. }
  50. }
  51. $fjs: (
  52. fs: flex-start,
  53. fe: flex-end,
  54. sb: space-between,
  55. sa: space-around,
  56. c: center
  57. );
  58. $ais: (
  59. fs: flex-start,
  60. fe: flex-end,
  61. s: stretch,
  62. b: baseline,
  63. c: center
  64. );
  65. @each $fjsKey, $fjsValue in $fjs {
  66. @each $aisKey, $aisValue in $ais {
  67. .f-#{$fjsKey}-#{$aisKey} {
  68. display: flex;
  69. justify-content: $fjsValue;
  70. align-items: $aisValue;
  71. }
  72. }
  73. }
  74. .f-col {
  75. flex-direction: column;
  76. }
  77. .f-row {
  78. flex-direction: row;
  79. }
  80. @for $i from 1 through 24 {
  81. .flex-#{$i} {
  82. flex: $i;
  83. display: block;
  84. min-width: 0;
  85. }
  86. }
  87. .bg-w {
  88. background-color: #fff;
  89. }
  90. .br-10 {
  91. border-radius: 10px;
  92. }