flex.scss 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. //弹性布局相关样式
  2. .flex {
  3. &-row {
  4. /* #ifndef APP-NVUE */
  5. display: flex;
  6. box-sizing: border-box;
  7. /* #endif */
  8. flex-direction: row!important;
  9. }
  10. &-col {
  11. /* #ifndef APP-NVUE */
  12. display: flex;
  13. box-sizing: border-box;
  14. /* #endif */
  15. flex-direction: column!important;
  16. }
  17. &-column {
  18. /* #ifndef APP-NVUE */
  19. display: flex;
  20. box-sizing: border-box;
  21. /* #endif */
  22. flex-direction: column!important;
  23. }
  24. &-one {
  25. flex: 1;
  26. }
  27. &-two {
  28. flex: 3;
  29. }
  30. &-three {
  31. flex: 3;
  32. }
  33. &-four {
  34. flex: 4;
  35. }
  36. &-five {
  37. flex: 5;
  38. }
  39. &-six {
  40. flex: 6;
  41. }
  42. &-center {
  43. justify-content: center;
  44. align-items: center;
  45. }
  46. &-grow-0 {
  47. flex-grow: 0 !important;
  48. }
  49. &-grow-1 {
  50. flex-grow: 1 !important;
  51. }
  52. &-shrink-0 {
  53. flex-shrink: 0 !important;
  54. }
  55. &-shrink-1 {
  56. flex-shrink: 1 !important;
  57. }
  58. &-wrap {
  59. flex-wrap: wrap !important;
  60. &-reverse {
  61. flex-wrap: wrap-reverse !important;
  62. }
  63. }
  64. &-nowrap {
  65. flex-wrap: nowrap !important;
  66. }
  67. }
  68. .justify {
  69. &-start {
  70. justify-content: flex-start;
  71. }
  72. &-center {
  73. justify-content: center;
  74. }
  75. &-end {
  76. justify-content: flex-end;
  77. }
  78. &-between {
  79. justify-content: space-between;
  80. }
  81. &-around {
  82. justify-content: space-around;
  83. }
  84. &-stretch {
  85. justify-content: stretch;
  86. }
  87. }
  88. .align {
  89. &-start {
  90. align-items: flex-start;
  91. }
  92. &-center {
  93. align-items: center;
  94. }
  95. &-end {
  96. align-items: flex-end;
  97. }
  98. &-baseline {
  99. align-items: baseline;
  100. }
  101. &-stretch {
  102. align-items: stretch;
  103. }
  104. }
  105. .full {
  106. &-width {
  107. width: 100%;
  108. }
  109. &-height {
  110. flex: 1;
  111. height: 100%;
  112. }
  113. &-page-width {
  114. width: 100vw;
  115. }
  116. &-page-height {
  117. flex: 1;
  118. height: 100vh;
  119. }
  120. &-abs {
  121. position: absolute;
  122. top: 0;
  123. left: 0;
  124. right: 0;
  125. bottom: 0;
  126. }
  127. }
  128. .gap-0 {
  129. &-row-0 {
  130. row-gap: 0;
  131. }
  132. &-column-0 {
  133. column-gap: 0;
  134. }
  135. &-0 {
  136. gap: 0;
  137. }
  138. }