index.scss 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. @use './element.scss' as *;
  2. @use './common.scss' as *;
  3. :root {
  4. box-sizing: border-box;
  5. font-family: 'Inter', system-ui, 'Avenir', 'Helvetica', 'Arial', sans-serif;
  6. font-size: 16px;
  7. font-weight: 400;
  8. line-height: 1.5;
  9. color: $font-color;
  10. color-scheme: light dark;
  11. background-color: $main-background-color;
  12. text-rendering: optimizeLegibility;
  13. -webkit-font-smoothing: antialiased;
  14. -moz-osx-font-smoothing: grayscale;
  15. text-size-adjust: 100%;
  16. }
  17. body {
  18. width: 100%;
  19. min-width: 320px;
  20. height: 100vh;
  21. min-height: 100vh;
  22. padding: 0;
  23. margin: 0;
  24. }
  25. #app {
  26. width: 100%;
  27. height: 100%;
  28. overflow: hidden;
  29. }
  30. h1 {
  31. font-size: 3.2em;
  32. line-height: 1.1;
  33. }
  34. a {
  35. font-weight: 500;
  36. color: #646cff;
  37. text-decoration: inherit;
  38. &:hover {
  39. color: #535bf2;
  40. }
  41. }
  42. button {
  43. padding: 0.6em 1.2em;
  44. font-family: inherit;
  45. font-size: 1em;
  46. font-weight: 500;
  47. cursor: pointer;
  48. background-color: #1a1a1a;
  49. border: 1px solid transparent;
  50. border-radius: 8px;
  51. transition: border-color 0.25s;
  52. &:hover {
  53. border-color: #646cff;
  54. }
  55. &:focus,
  56. &:focus-visible {
  57. outline: 4px auto -webkit-focus-ring-color;
  58. }
  59. }
  60. ul {
  61. padding-inline-start: 0;
  62. margin: 0;
  63. li {
  64. list-style: none;
  65. }
  66. }
  67. .rich-text {
  68. ul,
  69. ol {
  70. padding-left: 40px;
  71. margin: 1em 0;
  72. }
  73. ul li {
  74. list-style: disc;
  75. }
  76. ol li {
  77. list-style: decimal;
  78. }
  79. }
  80. /* 富文本着重点 */
  81. .rich-text-emphasis-dot {
  82. display: inline;
  83. padding-bottom: 0.2em; /* 间距也相对于字体 */
  84. background-image: radial-gradient(circle at center, currentColor 0.15em, /* 圆点大小相对于字体 */ transparent 0.16em);
  85. background-repeat: repeat-x;
  86. background-position: 0 100%;
  87. background-size: 1em 0.3em; /* 间距相对于字体大小,高度相对字体 */
  88. border-bottom: none;
  89. }
  90. .card {
  91. padding: 2em;
  92. }
  93. *,
  94. *::before,
  95. *::after {
  96. box-sizing: inherit;
  97. }
  98. @media (prefers-color-scheme: light) {
  99. :root {
  100. color: $font-color;
  101. background-color: $main-background-color;
  102. }
  103. a:hover {
  104. color: #747bff;
  105. }
  106. button {
  107. background-color: #f9f9f9;
  108. }
  109. }