global.scss 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624
  1. /*
  2. * @Author: jmy
  3. * @Date: 2025-12-31 12:02:41
  4. * @LastEditors: Please set LastEditors
  5. * @LastEditTime: 2025-12-13 16:48:17
  6. * @Description:
  7. */
  8. /* 设置字体为苹方(PingFang SC),若系统无该字体则再次回退到 PingFang SC;强制正常字形;禁止文本大小写转换 */
  9. view,
  10. text {
  11. font-family: PingFang SC, PingFang SC;
  12. font-style: normal;
  13. text-transform: none;
  14. }
  15. view{
  16. box-sizing: border-box;
  17. }
  18. // 导航栏头部
  19. .uni-navbar__header {
  20. display: flex;
  21. align-items: center;
  22. padding: 0 24rpx !important;
  23. box-sizing: border-box;
  24. }
  25. .uni-navbar__header-container {
  26. padding: 0 !important;
  27. }
  28. .scs-headr-default {
  29. width: 73%;
  30. }
  31. /* #ifndef APP-NVUE */
  32. /* Display */
  33. .flex {
  34. display: flex;
  35. display: -webkit-flex;
  36. }
  37. /* Flex Direction */
  38. /* 主轴方向:水平,起点在左侧 */
  39. .flex-row {
  40. flex-direction: row;
  41. -webkit-flex-direction: row;
  42. }
  43. /* 主轴方向:水平,起点在右侧 */
  44. .flex-row-reverse {
  45. flex-direction: row-reverse;
  46. -webkit-flex-direction: row-reverse;
  47. }
  48. /* 主轴方向:垂直,起点在上方 */
  49. .flex-column {
  50. flex-direction: column;
  51. -webkit-flex-direction: column;
  52. }
  53. /* 主轴方向:垂直,起点在下方 */
  54. .flex-column-reverse {
  55. flex-direction: column-reverse;
  56. -webkit-flex-direction: column-reverse;
  57. }
  58. /* Flex Wrap */
  59. /* 主轴方向换行:空间不足时自动换行*/
  60. .flex-wrap {
  61. flex-wrap: wrap;
  62. -webkit-flex-wrap: wrap;
  63. }
  64. /*主轴方向不换行:所有子项强制单行/列*/
  65. .flex-nowrap {
  66. flex-wrap: nowrap;
  67. -webkit-flex-wrap: nowrap;
  68. }
  69. /*主轴方向反向换行:空间不足时自动换行,且行序反转*/
  70. .flex-wrap-reverse {
  71. flex-wrap: wrap-reverse;
  72. -webkit-flex-wrap: wrap-reverse;
  73. }
  74. /* Justify Content */
  75. /*主轴对齐:子项在主轴起点对齐*/
  76. .justify-start {
  77. justify-content: flex-start;
  78. -webkit-justify-content: flex-start;
  79. }
  80. /*主轴对齐:子项在主轴起点对齐*/
  81. .justify-center {
  82. justify-content: center;
  83. -webkit-justify-content: center;
  84. }
  85. /* 主轴对齐:子项在主轴终点对齐 */
  86. .justify-end {
  87. justify-content: flex-end;
  88. -webkit-justify-content: flex-end;
  89. }
  90. /* 主轴对齐:首尾子项贴边,其余子项间距相等 */
  91. .justify-between {
  92. justify-content: space-between;
  93. -webkit-justify-content: space-between;
  94. }
  95. /* 主轴对齐:每个子项两侧的间距相等,首尾子项与容器边缘间距为中间间距的一半 */
  96. .justify-around {
  97. justify-content: space-around;
  98. -webkit-justify-content: space-around;
  99. }
  100. /* 主轴对齐:项目之间与两端间距完全相等 */
  101. .justify-evenly {
  102. justify-content: space-evenly;
  103. -webkit-justify-content: space-evenly;
  104. }
  105. /* Align Items */
  106. /* 交叉轴对齐:子项顶部对齐 */
  107. .items-start {
  108. align-items: flex-start;
  109. -webkit-align-items: flex-start;
  110. }
  111. /* 交叉轴对齐:子项居中对齐 */
  112. .items-center {
  113. align-items: center;
  114. -webkit-align-items: center;
  115. }
  116. /* 交叉轴对齐:子项底部对齐 */
  117. .items-end {
  118. align-items: flex-end;
  119. -webkit-align-items: flex-end;
  120. }
  121. /* 交叉轴对齐:子项拉伸填满容器高度 */
  122. .items-stretch {
  123. align-items: stretch;
  124. -webkit-align-items: stretch;
  125. }
  126. /* 交叉轴对齐:子项基线对齐 */
  127. .items-baseline {
  128. align-items: baseline;
  129. -webkit-align-items: baseline;
  130. }
  131. /* 快捷 flex 值:占满剩余空间 */
  132. .flex-1 {
  133. flex: 1;
  134. -webkit-flex: 1;
  135. }
  136. /* 自动伸缩:根据内容决定尺寸,可伸可缩 */
  137. .flex-auto {
  138. flex: auto;
  139. -webkit-flex: auto;
  140. }
  141. /* 初始尺寸:使用 flex-basis 定义的初始大小,可伸可缩 */
  142. .flex-initial {
  143. flex: initial;
  144. -webkit-flex: initial;
  145. }
  146. /* 不伸缩:固定尺寸,不参与分配剩余空间 */
  147. .flex-none {
  148. flex: none;
  149. -webkit-flex: none;
  150. }
  151. /* 禁止放大 */
  152. .flex-grow-0 {
  153. flex-grow: 0;
  154. -webkit-flex-grow: 0;
  155. }
  156. /* 允许放大并占满剩余空间 */
  157. .flex-grow-1 {
  158. flex-grow: 1;
  159. -webkit-flex-grow: 1;
  160. }
  161. /* 禁止缩小 */
  162. .flex-shrink-0 {
  163. flex-shrink: 0;
  164. -webkit-flex-shrink: 0;
  165. }
  166. /* 允许缩小 */
  167. .flex-shrink-1 {
  168. flex-shrink: 1;
  169. -webkit-flex-shrink: 1;
  170. }
  171. /* #endif */
  172. .fw-400 {
  173. font-weight: 400;
  174. }
  175. .fw-500 {
  176. font-weight: 500;
  177. }
  178. .fw-600 {
  179. font-weight: 600;
  180. }
  181. /* 文本对齐方式 */
  182. .text-left {
  183. text-align: left;
  184. }
  185. .text-center {
  186. text-align: center;
  187. }
  188. .text-right {
  189. text-align: right;
  190. }
  191. .text-justify {
  192. text-align: justify;
  193. }
  194. .text-start {
  195. text-align: start;
  196. }
  197. .text-end {
  198. text-align: end;
  199. }
  200. .w-all {
  201. width: 100%;
  202. }
  203. .h-all {
  204. height: 100%;
  205. }
  206. .relative {
  207. position: relative;
  208. }
  209. .absolute {
  210. position: absolute;
  211. }
  212. .fixed {
  213. position: fixed;
  214. }
  215. /* Overflow */
  216. .overflow-visible {
  217. overflow: visible;
  218. }
  219. .overflow-hidden {
  220. overflow: hidden;
  221. }
  222. .overflow-scroll {
  223. overflow: scroll;
  224. }
  225. .overflow-auto {
  226. overflow: auto;
  227. }
  228. .overflow-x-visible {
  229. overflow-x: visible;
  230. }
  231. .overflow-x-hidden {
  232. overflow-x: hidden;
  233. }
  234. .overflow-x-scroll {
  235. overflow-x: scroll;
  236. }
  237. .overflow-x-auto {
  238. overflow-x: auto;
  239. }
  240. .overflow-y-visible {
  241. overflow-y: visible;
  242. }
  243. .overflow-y-hidden {
  244. overflow-y: hidden;
  245. }
  246. .overflow-y-scroll {
  247. overflow-y: scroll;
  248. }
  249. .overflow-y-auto {
  250. overflow-y: auto;
  251. }
  252. /* (-500 to 1000px, all numbers, auto convert to rpx: px * 2 = rpx) */
  253. @for $i from -500 through 1000 {
  254. $size: $i * 2rpx;
  255. /* top */
  256. .top-#{$i} {
  257. top: $size;
  258. }
  259. /* left */
  260. .left-#{$i} {
  261. left: $size;
  262. }
  263. /* right */
  264. .right-#{$i} {
  265. right: $size;
  266. }
  267. /* bottom */
  268. .bottom-#{$i} {
  269. bottom: $size;
  270. }
  271. }
  272. /* z-index (-100 to 10000 all numbers) */
  273. @for $i from -100 through 10000 {
  274. .zi-#{$i} {
  275. z-index: $i;
  276. }
  277. }
  278. /* Font sizes (1px to 100px, all numbers, auto convert to rpx: px * 2 = rpx) */
  279. @for $i from 1 through 100 {
  280. $size: $i * 2rpx;
  281. .fs-#{$i} {
  282. font-size: $size;
  283. }
  284. }
  285. /* line height (1px to 100px, all numbers, auto convert to rpx: px * 2 = rpx) */
  286. @for $i from 1 through 100 {
  287. $size: $i * 2rpx;
  288. .lh-#{$i} {
  289. line-height: $size;
  290. }
  291. }
  292. /* Margins (1px to 100px, all numbers, auto convert to rpx: px * 2 = rpx) */
  293. @for $i from 1 through 100 {
  294. $size: $i * 2rpx;
  295. /* Margin */
  296. .m-#{$i} {
  297. margin: $size;
  298. }
  299. /* Margin top */
  300. .mt-#{$i} {
  301. margin-top: $size;
  302. }
  303. /* Margin right */
  304. .mr-#{$i} {
  305. margin-right: $size;
  306. }
  307. /* Margin bottom */
  308. .mb-#{$i} {
  309. margin-bottom: $size;
  310. }
  311. /* Margin left */
  312. .ml-#{$i} {
  313. margin-left: $size;
  314. }
  315. /* Margin horizontal */
  316. .mx-#{$i} {
  317. margin-left: $size;
  318. margin-right: $size;
  319. }
  320. /* Margin vertical */
  321. .my-#{$i} {
  322. margin-top: $size;
  323. margin-bottom: $size;
  324. }
  325. }
  326. /* Paddings (1px to 100px, all numbers, auto convert to rpx: px * 2 = rpx) */
  327. @for $i from 1 through 100 {
  328. $size: $i * 2rpx;
  329. /* Padding */
  330. .p-#{$i} {
  331. padding: $size;
  332. }
  333. /* Padding top */
  334. .pt-#{$i} {
  335. padding-top: $size;
  336. }
  337. /* Padding right */
  338. .pr-#{$i} {
  339. padding-right: $size;
  340. }
  341. /* Padding bottom */
  342. .pb-#{$i} {
  343. padding-bottom: $size;
  344. }
  345. /* Padding left */
  346. .pl-#{$i} {
  347. padding-left: $size;
  348. }
  349. /* Padding horizontal */
  350. .px-#{$i} {
  351. padding-left: $size;
  352. padding-right: $size;
  353. }
  354. /* Padding vertical */
  355. .py-#{$i} {
  356. padding-top: $size;
  357. padding-bottom: $size;
  358. }
  359. }
  360. /* Gaps (1px to 100px, all numbers, auto convert to rpx: px * 2 = rpx) */
  361. /* #ifndef APP-NVUE */
  362. @for $i from 1 through 100 {
  363. $size: $i * 2rpx;
  364. .gap-#{$i} {
  365. gap: $size;
  366. }
  367. }
  368. /* #endif */
  369. /* Widths (1px to 375px, all numbers, auto convert to rpx: px * 2 = rpx) */
  370. @for $i from 1 through 375 {
  371. $size: $i * 2rpx;
  372. .w-#{$i} {
  373. width: $size;
  374. }
  375. }
  376. /* Heights (1px to 375px, all numbers, auto convert to rpx: px * 2 = rpx) */
  377. @for $i from 1 through 375 {
  378. $size: $i * 2rpx;
  379. .h-#{$i} {
  380. height: $size;
  381. }
  382. }
  383. /* Border Radius (1px to 100px, all numbers, auto convert to rpx: px * 2 = rpx) */
  384. @for $i from 1 through 100 {
  385. $size: $i * 2rpx;
  386. .rounded-#{$i} {
  387. border-radius: $size;
  388. }
  389. }
  390. @for $i from 1 through 100 {
  391. $size: $i * 2rpx;
  392. .rounded-t-#{$i} {
  393. border-top-left-radius: $size;
  394. border-top-right-radius: $size;
  395. }
  396. }
  397. @for $i from 1 through 100 {
  398. $size: $i * 2rpx;
  399. .rounded-b-#{$i} {
  400. border-bottom-left-radius: $size;
  401. border-bottom-right-radius: $size;
  402. }
  403. }
  404. /* Line Height (1px to 100px, all numbers, auto convert to rpx: px * 2 = rpx) */
  405. @for $i from 1 through 100 {
  406. $size: $i * 2rpx;
  407. .lh-#{$i} {
  408. line-height: $size;
  409. }
  410. }
  411. // 定义颜色列表
  412. $colors: (
  413. '000000', '333333', '666666', '999999', 'CCCCCC', 'FFFFFF',
  414. 'FF0000', '00FF00', '0000FF', 'FFFF00', 'FF00FF', '00FFFF',
  415. 'FFA500', '800080', 'FFC0CB', 'A52A2A', '808080', 'D3D3D3',
  416. 'F5F5F5', 'FAFAFA', 'F8F9FA', 'E9ECEF', 'DEE2E6', 'CED4DA',
  417. 'ADB5BD', '6C757D', '495057', '343A40', '212529', '007BFF',
  418. '0069D9', '0056B3', '004085', '002752', '28A745', '218838',
  419. '1E7E34', '155724', '0F3D1F', 'DC3545', 'C82333', 'BD2130',
  420. 'A71E2A', '6E001D', 'FFC107', 'E0A800', 'D39E00', 'B8860B',
  421. '6C5600', '17A2B8', '138496', '117A8B', '0C5460', '062B36',
  422. 'F5F7FA', 'EEEEEE', '02B176', 'FA341E', 'D46C0D',
  423. );
  424. // 文字颜色类 - 标准化格式
  425. @each $hex in $colors {
  426. .text-#{$hex} {
  427. color: unquote('#')#{$hex};
  428. }
  429. }
  430. // 背景颜色类
  431. @each $hex in $colors {
  432. .bg-#{$hex} {
  433. background-color: unquote('#')#{$hex};
  434. }
  435. }
  436. // 边框颜色类
  437. @each $hex in $colors {
  438. .border-#{$hex} {
  439. border-color: unquote('#')#{$hex};
  440. }
  441. }
  442. /* 主题色彩快捷类 */
  443. .text-primary {
  444. color: #007bff;
  445. }
  446. .text-success {
  447. color: #28a745;
  448. }
  449. .text-danger {
  450. color: #dc3545;
  451. }
  452. .text-warning {
  453. color: #ffc107;
  454. }
  455. .text-info {
  456. color: #17a2b8;
  457. }
  458. .text-light {
  459. color: #f8f9fa;
  460. }
  461. .text-dark {
  462. color: #343a40;
  463. }
  464. .text-muted {
  465. color: #6c757d;
  466. }
  467. .text-white {
  468. color: #ffffff;
  469. }
  470. .bg-primary {
  471. background-color: #007bff;
  472. }
  473. .bg-success {
  474. background-color: #28a745;
  475. }
  476. .bg-danger {
  477. background-color: #dc3545;
  478. }
  479. .bg-warning {
  480. background-color: #ffc107;
  481. }
  482. .bg-info {
  483. background-color: #17a2b8;
  484. }
  485. .bg-light {
  486. background-color: #f8f9fa;
  487. }
  488. .bg-dark {
  489. background-color: #343a40;
  490. }
  491. .bg-white {
  492. background-color: #ffffff;
  493. }
  494. /* 透明度类 */
  495. @for $i from 1 through 9 {
  496. .opacity-#{$i} {
  497. opacity: $i * 0.1;
  498. }
  499. }
  500. .opacity-0 {
  501. opacity: 0;
  502. }
  503. .opacity-10 {
  504. opacity: 1;
  505. }