uni.scss 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. /**
  2. * 这里是uni-app内置的常用样式变量
  3. *
  4. * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
  5. * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
  6. *
  7. */
  8. /**
  9. * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
  10. *
  11. * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
  12. */
  13. /* 颜色变量 */
  14. @import '@/uni_modules/uview-ui/theme.scss';
  15. /* 行为相关颜色 */
  16. $uni-color-primary: #00A447;
  17. $uni-color-success: #4cd964;
  18. $uni-color-warning: #f0ad4e;
  19. $uni-color-error: #dd524d;
  20. /* 文字基本颜色 */
  21. $uni-text-color:#333;//基本色
  22. $uni-text-color-inverse:#fff;//反色
  23. $uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
  24. $uni-text-color-placeholder: #808080;
  25. $uni-text-color-disable:#c0c0c0;
  26. $uni-text-color-red:#FF3C3F;
  27. /* 背景颜色 */
  28. $uni-bg-color:#ffffff;
  29. $uni-bg-color-grey:#f8f8f8;
  30. $uni-bg-color-hover:#f1f1f1;//点击状态颜色
  31. $uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
  32. $uni-background-color:#F5F5F5;
  33. /* 边框颜色 */
  34. $uni-border-color:#eee;
  35. /* 尺寸变量 */
  36. /* 文字尺寸 */
  37. $uni-font-size-sm:12px;
  38. $uni-font-size-base:14px;
  39. $uni-font-size-lg:16;
  40. /* 图片尺寸 */
  41. $uni-img-size-sm:20px;
  42. $uni-img-size-base:26px;
  43. $uni-img-size-lg:40px;
  44. /* Border Radius */
  45. $uni-border-radius-sm: 2px;
  46. $uni-border-radius-base: 3px;
  47. $uni-border-radius-lg: 6px;
  48. $uni-border-radius-circle: 50%;
  49. /* 水平间距 */
  50. $uni-spacing-row-sm: 5px;
  51. $uni-spacing-row-base: 10px;
  52. $uni-spacing-row-lg: 15px;
  53. /* 垂直间距 */
  54. $uni-spacing-col-sm: 4px;
  55. $uni-spacing-col-base: 8px;
  56. $uni-spacing-col-lg: 12px;
  57. /* 透明度 */
  58. $uni-opacity-disabled: 0.3; // 组件禁用态的透明度
  59. /* 文章场景相关 */
  60. $uni-color-title: #2C405A; // 文章标题颜色
  61. $uni-font-size-title:20px;
  62. $uni-color-subtitle: #555555; // 二级标题颜色
  63. $uni-font-size-subtitle:26px;
  64. $uni-color-paragraph: #3F536E; // 文章段落颜色
  65. $uni-font-size-paragraph:15px;
  66. page{
  67. padding-top: 0;
  68. // &:has(.u-navbar){
  69. // padding-top: 104px;
  70. // }
  71. }
  72. // @import url("@/static/css/flex.scss");
  73. .u-flex {
  74. display: flex;
  75. flex-direction: row;
  76. align-items: center;
  77. }
  78. .u-flex-wrap {
  79. flex-wrap: wrap;
  80. }
  81. .u-flex-nowrap {
  82. flex-wrap: nowrap;
  83. }
  84. .u-col-center {
  85. align-items: center;
  86. }
  87. .u-col-top {
  88. align-items: flex-start;
  89. }
  90. .u-col-bottom {
  91. align-items: flex-end;
  92. }
  93. .u-row-center {
  94. justify-content: center;
  95. }
  96. .u-row-left {
  97. justify-content: flex-start;
  98. }
  99. .u-row-right {
  100. justify-content: flex-end;
  101. }
  102. .u-row-between {
  103. justify-content: space-between;
  104. }
  105. .u-row-around {
  106. justify-content: space-around;
  107. }
  108. .u-text-left {
  109. text-align: left;
  110. }
  111. .u-text-center {
  112. text-align: center;
  113. }
  114. .u-text-right {
  115. text-align: right;
  116. }
  117. .u-flex-col {
  118. /* #ifndef APP-NVUE */
  119. display: flex;
  120. /* #endif */
  121. flex-direction: column;
  122. }
  123. // 定义flex等分
  124. @for $i from 0 through 12 {
  125. .u-flex-#{$i} {
  126. flex: $i;
  127. }
  128. }
  129. @mixin multi-ellipsis($line: 1) {
  130. @if $line <= 0 {
  131. $line: 1;
  132. }
  133. overflow: hidden;
  134. text-overflow: ellipsis;
  135. display: -webkit-box;
  136. -webkit-line-clamp: $line;
  137. -webkit-box-orient: vertical;
  138. }
  139. .ellipsis-1 {
  140. @include multi-ellipsis(1);
  141. }
  142. .ellipsis-2 {
  143. @include multi-ellipsis(2);
  144. }
  145. .tabs-wrap{
  146. margin-bottom: 30rpx;
  147. .more{
  148. font-size: 24rpx;
  149. color: #999;
  150. }
  151. }
  152. .page-bg{
  153. position: absolute;
  154. z-index: -1;
  155. left: 0;
  156. top: 0;
  157. right: 0;
  158. .img{
  159. width: 100%;
  160. }
  161. }
  162. .pickup-info{
  163. padding: 0 30rpx;
  164. .item{
  165. padding: 30rpx 0;
  166. font-size: 30rpx;
  167. font-weight: 400;
  168. color: #333333;
  169. line-height: 42rpx;
  170. &:not(:last-of-type){
  171. border-bottom: 1px solid #eee;
  172. }
  173. }
  174. }