common.scss 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. // 字体
  2. @for $i from 20 through 100{
  3. .fs#{$i} {
  4. font-size: #{$i}rpx;
  5. }
  6. }
  7. // padding
  8. @for $i from 1 through 100{
  9. .p#{$i} {
  10. padding: #{$i}rpx;
  11. }
  12. }
  13. @for $i from 1 through 100{
  14. .ptb#{$i} {
  15. padding-top: #{$i}rpx ;
  16. padding-bottom: #{$i}rpx ;
  17. }
  18. }
  19. @for $i from 1 through 100{
  20. .plr#{$i} {
  21. padding-left: #{$i}rpx;
  22. padding-right: #{$i}rpx;
  23. }
  24. }
  25. @for $i from 1 through 100{
  26. .pt#{$i} {
  27. padding-top: #{$i}rpx;
  28. }
  29. }
  30. @for $i from 1 through 100{
  31. .pl#{$i} {
  32. padding-left: #{$i}rpx;
  33. }
  34. }
  35. @for $i from 1 through 100{
  36. .pr#{$i} {
  37. padding-right: #{$i}rpx;
  38. }
  39. }
  40. @for $i from 1 through 100{
  41. .pb#{$i} {
  42. padding-bottom: #{$i}rpx;
  43. }
  44. }
  45. // margin
  46. @for $i from 1 through 100{
  47. .m#{$i} {
  48. margin: #{$i}rpx;
  49. }
  50. }
  51. @for $i from 1 through 100{
  52. .mtb#{$i} {
  53. margin-top: #{$i}rpx ;
  54. margin-bottom: #{$i}rpx ;
  55. }
  56. }
  57. @for $i from 1 through 100{
  58. .mlr#{$i} {
  59. margin-left: #{$i}rpx;
  60. margin-right: #{$i}rpx;
  61. }
  62. }
  63. @for $i from 1 through 100{
  64. .mt#{$i} {
  65. margin-top: #{$i}rpx;
  66. }
  67. }
  68. @for $i from 1 through 100{
  69. .ml#{$i} {
  70. margin-left: #{$i}rpx;
  71. }
  72. }
  73. @for $i from 1 through 100{
  74. .mr#{$i} {
  75. margin-right: #{$i}rpx;
  76. }
  77. }
  78. @for $i from 1 through 100{
  79. .mb#{$i} {
  80. margin-bottom: #{$i}rpx;
  81. }
  82. }
  83. // 圆角
  84. @for $i from 0 through 100{
  85. .radius#{$i} {
  86. border-radius: #{$i}rpx;
  87. }
  88. }
  89. // padding 左右+width自动计算
  90. @for $i from 10 through 50{
  91. .w-calc-#{$i} {
  92. width: calc(100% - #{$i*2}rpx);
  93. padding-left: #{$i}rpx;
  94. padding-right: #{$i}rpx;
  95. }
  96. }
  97. // width 宽
  98. @for $i from 1 through 999{
  99. .w#{$i} {
  100. width:#{$i}rpx;
  101. }
  102. }
  103. // height 高
  104. @for $i from 1 through 999{
  105. .h#{$i} {
  106. height:#{$i}rpx;
  107. }
  108. }
  109. // height width 宽高
  110. @for $i from 1 through 999{
  111. .wh#{$i} {
  112. height:#{$i}rpx;
  113. width:#{$i}rpx;
  114. }
  115. }
  116. // line-height 行高
  117. @for $i from 1 through 999{
  118. .lh#{$i} {
  119. line-height:#{$i}rpx;
  120. }
  121. }