flex.scss 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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. &-center {
  28. justify-content: center;
  29. align-items: center;
  30. }
  31. &-grow-0 {
  32. flex-grow: 0 !important;
  33. }
  34. &-grow-1 {
  35. flex-grow: 1 !important;
  36. }
  37. &-shrink-0 {
  38. flex-shrink: 0 !important;
  39. }
  40. &-shrink-1 {
  41. flex-shrink: 1 !important;
  42. }
  43. &-wrap {
  44. flex-wrap: wrap !important;
  45. &-reverse {
  46. flex-wrap: wrap-reverse !important;
  47. }
  48. }
  49. &-nowrap {
  50. flex-wrap: nowrap !important;
  51. }
  52. }
  53. .justify {
  54. &-start {
  55. justify-content: flex-start;
  56. }
  57. &-center {
  58. justify-content: center;
  59. }
  60. &-end {
  61. justify-content: flex-end;
  62. }
  63. &-between {
  64. justify-content: space-between;
  65. }
  66. &-around {
  67. justify-content: space-around;
  68. }
  69. &-stretch {
  70. justify-content: stretch;
  71. }
  72. }
  73. .align {
  74. &-start {
  75. align-items: flex-start;
  76. }
  77. &-center {
  78. align-items: center;
  79. }
  80. &-end {
  81. align-items: flex-end;
  82. }
  83. &-baseline {
  84. align-items: baseline;
  85. }
  86. &-stretch {
  87. align-items: stretch;
  88. }
  89. }
  90. .full {
  91. &-width {
  92. /* #ifndef APP-NVUE */
  93. width: 100%;
  94. /* #endif */
  95. /* #ifdef APP-NVUE */
  96. width: 750rpx;
  97. /* #endif */
  98. }
  99. &-height {
  100. flex: 1;
  101. /* #ifndef APP-NVUE */
  102. height: 100%;
  103. /* #endif */
  104. }
  105. &-page-width {
  106. width: 750rpx;
  107. /* #ifndef APP-NVUE */
  108. width: 750rpx;
  109. /* #endif */
  110. }
  111. &-page-height {
  112. flex: 1;
  113. /* #ifndef APP-NVUE */
  114. height: 100vh;
  115. /* #endif */
  116. }
  117. &-abs {
  118. position: absolute;
  119. top: 0;
  120. left: 0;
  121. right: 0;
  122. bottom: 0;
  123. }
  124. }
  125. .gap-0 {
  126. &-row-0 {
  127. row-gap: 0;
  128. }
  129. &-column-0 {
  130. column-gap: 0;
  131. }
  132. &-0 {
  133. gap: 0;
  134. }
  135. }