global.css 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. @tailwind base;
  2. @tailwind components;
  3. @tailwind utilities;
  4. @layer base {
  5. *,
  6. ::after,
  7. ::before {
  8. @apply border-border;
  9. box-sizing: border-box;
  10. border-style: solid;
  11. border-width: 0;
  12. }
  13. html {
  14. @apply text-foreground bg-background font-sans;
  15. font-size: var(--font-size-base, 16px);
  16. font-variation-settings: normal;
  17. font-synthesis-weight: none;
  18. line-height: 1.15;
  19. text-size-adjust: 100%;
  20. scroll-behavior: smooth;
  21. text-rendering: optimizelegibility;
  22. -webkit-tap-highlight-color: transparent;
  23. /* -webkit-font-smoothing: antialiased;
  24. -moz-osx-font-smoothing: grayscale; */
  25. }
  26. #app,
  27. body,
  28. html {
  29. @apply size-full;
  30. /* scrollbar-gutter: stable; */
  31. }
  32. body {
  33. min-height: 100vh;
  34. /* pointer-events: auto !important; */
  35. /* overflow: overlay; */
  36. /* -webkit-font-smoothing: antialiased; */
  37. /* -moz-osx-font-smoothing: grayscale; */
  38. }
  39. a,
  40. a:active,
  41. a:hover,
  42. a:link,
  43. a:visited {
  44. @apply no-underline;
  45. }
  46. ::view-transition-new(root),
  47. ::view-transition-old(root) {
  48. @apply animate-none mix-blend-normal;
  49. }
  50. ::view-transition-old(root) {
  51. @apply z-[1];
  52. }
  53. ::view-transition-new(root) {
  54. @apply z-[2147483646];
  55. }
  56. html.dark::view-transition-old(root) {
  57. @apply z-[2147483646];
  58. }
  59. html.dark::view-transition-new(root) {
  60. @apply z-[1];
  61. }
  62. input::placeholder,
  63. textarea::placeholder {
  64. @apply opacity-100;
  65. }
  66. /* input:-webkit-autofill {
  67. @apply border-none;
  68. box-shadow: 0 0 0 1000px transparent inset;
  69. } */
  70. input[type='number']::-webkit-inner-spin-button,
  71. input[type='number']::-webkit-outer-spin-button {
  72. @apply m-0 appearance-none;
  73. }
  74. /* 只有非mac下才进行调整,mac下使用默认滚动条 */
  75. html:not([data-platform='macOs']) {
  76. ::-webkit-scrollbar {
  77. @apply h-[10px] w-[10px];
  78. }
  79. ::-webkit-scrollbar-thumb {
  80. @apply bg-border rounded-sm border-none;
  81. }
  82. ::-webkit-scrollbar-track {
  83. @apply rounded-sm border-none bg-transparent shadow-none;
  84. }
  85. ::-webkit-scrollbar-button {
  86. @apply hidden;
  87. }
  88. }
  89. }
  90. @layer components {
  91. .flex-center {
  92. @apply flex items-center justify-center;
  93. }
  94. .flex-col-center {
  95. @apply flex flex-col items-center justify-center;
  96. }
  97. .outline-box {
  98. @apply outline-border relative cursor-pointer rounded-md p-1 outline outline-1;
  99. }
  100. .outline-box::after {
  101. @apply absolute left-1/2 top-1/2 z-20 h-0 w-[1px] rounded-sm opacity-0 outline outline-2 outline-transparent transition-all duration-300 content-[""];
  102. }
  103. .outline-box.outline-box-active {
  104. @apply outline-primary outline outline-2;
  105. }
  106. .outline-box.outline-box-active::after {
  107. display: none;
  108. }
  109. .outline-box:not(.outline-box-active):hover::after {
  110. @apply outline-primary left-0 top-0 h-full w-full p-1 opacity-100;
  111. }
  112. .vben-link {
  113. @apply text-primary hover:text-primary-hover active:text-primary-active cursor-pointer;
  114. }
  115. .card-box {
  116. @apply bg-card text-card-foreground border-border rounded-xl border;
  117. }
  118. }
  119. html.invert-mode {
  120. @apply invert;
  121. }
  122. html.grayscale-mode {
  123. @apply grayscale;
  124. }