globals.css 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. /* 页面布局 CSS 变量 */
  2. :root {
  3. /* 头部高度 */
  4. --g-header-height: 60px;
  5. /* 侧边栏宽度 */
  6. --g-main-sidebar-width: 80px;
  7. --g-sub-sidebar-width: 220px;
  8. --g-sub-sidebar-collapse-width: 64px;
  9. /* 侧边栏 Logo 区域高度 */
  10. --g-sidebar-logo-height: 50px;
  11. /* 标签栏高度 */
  12. --g-tabbar-height: 50px;
  13. /* 工具栏高度 */
  14. --g-toolbar-height: 50px;
  15. }
  16. /* 明暗模式 CSS 变量 */
  17. /* stylelint-disable-next-line no-duplicate-selectors */
  18. :root {
  19. --g-box-shadow-color: rgb(0 0 0 / 12%);
  20. &::view-transition-old(root),
  21. &::view-transition-new(root) {
  22. mix-blend-mode: normal;
  23. animation: none;
  24. }
  25. &::view-transition-old(root) {
  26. z-index: 1;
  27. }
  28. &::view-transition-new(root) {
  29. z-index: 9999;
  30. }
  31. &.dark {
  32. --g-box-shadow-color: rgb(0 0 0 / 72%);
  33. &::view-transition-old(root) {
  34. z-index: 9999;
  35. }
  36. &::view-transition-new(root) {
  37. z-index: 1;
  38. }
  39. }
  40. }
  41. ::-webkit-scrollbar {
  42. width: 12px;
  43. height: 12px;
  44. }
  45. ::-webkit-scrollbar-thumb {
  46. background-color: rgb(0 0 0 / 40%);
  47. background-clip: padding-box;
  48. border: 3px solid transparent;
  49. border-radius: 6px;
  50. }
  51. ::-webkit-scrollbar-thumb:hover {
  52. background-color: rgb(0 0 0 / 50%);
  53. }
  54. ::-webkit-scrollbar-track {
  55. background-color: transparent;
  56. }
  57. html,
  58. body {
  59. height: 100%;
  60. }
  61. body {
  62. box-sizing: border-box;
  63. margin: 0;
  64. font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif;
  65. background-color: var(--g-container-bg);
  66. -webkit-tap-highlight-color: transparent;
  67. &.overflow-hidden {
  68. overflow: hidden;
  69. }
  70. }
  71. * {
  72. box-sizing: inherit;
  73. }
  74. #app {
  75. height: 100%;
  76. }
  77. /* 右侧内容区针对fixed元素,有横向铺满的需求,可在fixed元素上设置 [data-fixed-calc-width] */
  78. [data-fixed-calc-width] {
  79. position: fixed;
  80. right: 0;
  81. left: 50%;
  82. width: calc(100% - var(--g-main-sidebar-actual-width) - var(--g-sub-sidebar-actual-width));
  83. transform: translateX(-50%) translateX(calc(var(--g-main-sidebar-actual-width) / 2)) translateX(calc(var(--g-sub-sidebar-actual-width) / 2));
  84. [data-mode="mobile"] & {
  85. width: 100% !important;
  86. transform: translateX(-50%) !important;
  87. }
  88. }
  89. /* textarea 字体跟随系统 */
  90. textarea {
  91. font-family: inherit;
  92. }
  93. /* Overrides Floating Vue */
  94. .v-popper--theme-dropdown,
  95. .v-popper--theme-tooltip {
  96. --uno: inline-flex;
  97. }
  98. .v-popper--theme-dropdown .v-popper__inner,
  99. .v-popper--theme-tooltip .v-popper__inner {
  100. --uno: bg-white dark-bg-stone-8 text-dark dark-text-white rounded shadow ring-1 ring-gray-200 dark-ring-gray-800 border border-solid border-stone/20 text-xs font-normal;
  101. box-shadow: 0 6px 30px rgb(0 0 0 / 10%);
  102. }
  103. .v-popper--theme-tooltip .v-popper__arrow-inner,
  104. .v-popper--theme-dropdown .v-popper__arrow-inner {
  105. visibility: visible;
  106. --uno: border-white dark-border-stone-8;
  107. }
  108. .v-popper--theme-tooltip .v-popper__arrow-outer,
  109. .v-popper--theme-dropdown .v-popper__arrow-outer {
  110. --uno: border-stone/20;
  111. }
  112. .v-popper--theme-tooltip.v-popper--shown,
  113. .v-popper--theme-tooltip.v-popper--shown * {
  114. transition: none !important;
  115. }
  116. [data-overlayscrollbars-contents] {
  117. overscroll-behavior: contain;
  118. }
  119. .transition-all {
  120. border-radius: 8px;
  121. }
  122. .height100 {
  123. height: 100%;
  124. }
  125. .u-f-column {
  126. flex-direction: column;
  127. }
  128. .flex {
  129. display: flex;
  130. }
  131. .f-wrap {
  132. flex-wrap: wrap;
  133. }
  134. .j-s {
  135. justify-content: space-between;
  136. }
  137. .j-c {
  138. justify-content: center;
  139. }
  140. .j-start {
  141. justify-content: flex-start;
  142. }
  143. .j-end {
  144. justify-content: flex-end;
  145. }
  146. .a-c {
  147. align-items: center;
  148. }
  149. .a-start {
  150. align-items: flex-start;
  151. }
  152. .a-end {
  153. align-items: flex-end;
  154. }
  155. .f-c {
  156. flex-direction: column;
  157. }
  158. .mrgin-1 {
  159. margin: 10px;
  160. }
  161. .mrgin-2 {
  162. margin: 20px;
  163. }
  164. .m-top-5 {
  165. margin-top: 5px;
  166. }
  167. .m-top-10 {
  168. margin-top: 10px;
  169. }
  170. .m-btn-10 {
  171. margin-bottom: 10px;
  172. }
  173. .m-btn-15 {
  174. margin-bottom: 15px;
  175. }
  176. .vh100 {
  177. height: calc(100vh - 200px);
  178. }
  179. .strong {
  180. font-weight: bold;
  181. }
  182. .size14 {
  183. font-size: 14px;
  184. }
  185. .pad-1 {
  186. padding: 10px;
  187. }
  188. .pad-2 {
  189. padding: 20px;
  190. }
  191. .pad-3 {
  192. padding: 30px;
  193. }