reset.scss 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. @use 'common/var' as *;
  2. @use 'mixins/mixins' as *;
  3. body {
  4. font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
  5. '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. a {
  14. color: getCssVar('color', 'primary');
  15. text-decoration: none;
  16. &:hover,
  17. &:focus {
  18. color: getCssVar('color-primary', 'light-3');
  19. }
  20. &:active {
  21. color: getCssVar('color-primary', 'dark-2');
  22. }
  23. }
  24. h1,
  25. h2,
  26. h3,
  27. h4,
  28. h5,
  29. h6 {
  30. color: getCssVar('text-color', 'regular');
  31. font-weight: inherit;
  32. &:first-child {
  33. margin-top: 0;
  34. }
  35. &:last-child {
  36. margin-bottom: 0;
  37. }
  38. }
  39. h1 {
  40. font-size: calc(getCssVar('font-size', 'base') + 6px);
  41. }
  42. h2 {
  43. font-size: calc(getCssVar('font-size', 'base') + 4px);
  44. }
  45. h3 {
  46. font-size: calc(getCssVar('font-size', 'base') + 2px);
  47. }
  48. h4,
  49. h5,
  50. h6,
  51. p {
  52. font-size: inherit;
  53. }
  54. p {
  55. line-height: 1.8;
  56. &:first-child {
  57. margin-top: 0;
  58. }
  59. &:last-child {
  60. margin-bottom: 0;
  61. }
  62. }
  63. sup,
  64. sub {
  65. font-size: calc(getCssVar('font-size', 'base') - 1px);
  66. }
  67. small {
  68. font-size: calc(getCssVar('font-size', 'base') - 2px);
  69. }
  70. hr {
  71. margin-top: 20px;
  72. margin-bottom: 20px;
  73. border: 0;
  74. border-top: 1px solid getCssVar('border-color', 'lighter');
  75. }