reset.scss 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. @use 'common/var' as *;
  2. @use 'mixins/mixins' as *;
  3. body {
  4. font-family: Inter, 'Helvetica Neue', Helvetica, 'PingFang SC',
  5. 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  6. font-weight: 400;
  7. font-size: getCssVar('font-size', 'base');
  8. color: getCssVar('text-color', 'primary');
  9. -webkit-font-smoothing: antialiased;
  10. -moz-osx-font-smoothing: grayscale;
  11. -webkit-tap-highlight-color: transparent;
  12. }
  13. input,
  14. textarea,
  15. button {
  16. font-family: inherit;
  17. }
  18. a {
  19. color: getCssVar('color', 'primary');
  20. text-decoration: none;
  21. &:hover,
  22. &:focus {
  23. color: getCssVar('color-primary', 'light-3');
  24. }
  25. &:active {
  26. color: getCssVar('color-primary', 'dark-2');
  27. }
  28. }
  29. h1,
  30. h2,
  31. h3,
  32. h4,
  33. h5,
  34. h6 {
  35. color: getCssVar('text-color', 'regular');
  36. font-weight: inherit;
  37. &:first-child {
  38. margin-top: 0;
  39. }
  40. &:last-child {
  41. margin-bottom: 0;
  42. }
  43. }
  44. h1 {
  45. font-size: calc(getCssVar('font-size', 'base') + 6px);
  46. }
  47. h2 {
  48. font-size: calc(getCssVar('font-size', 'base') + 4px);
  49. }
  50. h3 {
  51. font-size: calc(getCssVar('font-size', 'base') + 2px);
  52. }
  53. h4,
  54. h5,
  55. h6,
  56. p {
  57. font-size: inherit;
  58. }
  59. p {
  60. line-height: 1.8;
  61. &:first-child {
  62. margin-top: 0;
  63. }
  64. &:last-child {
  65. margin-bottom: 0;
  66. }
  67. }
  68. sup,
  69. sub {
  70. font-size: calc(getCssVar('font-size', 'base') - 1px);
  71. }
  72. small {
  73. font-size: calc(getCssVar('font-size', 'base') - 2px);
  74. }
  75. hr {
  76. margin-top: 20px;
  77. margin-bottom: 20px;
  78. border: 0;
  79. border-top: 1px solid getCssVar('border-color', 'lighter');
  80. }