global.css 3.1 KB

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