global.css.ts 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. import { createGlobalStyle, css } from 'styled-components';
  2. export default createGlobalStyle(
  3. ({ theme }) => css`
  4. html {
  5. font-family: 'Inter', sans-serif;
  6. font-size: 14px;
  7. -webkit-font-smoothing: antialiased;
  8. -moz-osx-font-smoothing: grayscale;
  9. background-color: ${theme.layout.backgroundColor};
  10. overflow-x: hidden;
  11. overflow-y: scroll;
  12. text-rendering: optimizeLegibility;
  13. text-size-adjust: 100%;
  14. min-width: 300px;
  15. }
  16. #root,
  17. body {
  18. width: 100%;
  19. position: relative;
  20. margin: 0;
  21. font-family: 'Inter', sans-serif;
  22. font-size: 14px;
  23. font-weight: 400;
  24. line-height: 20px;
  25. }
  26. article,
  27. aside,
  28. figure,
  29. footer,
  30. header,
  31. hgroup,
  32. section {
  33. display: block;
  34. }
  35. body,
  36. button,
  37. input,
  38. optgroup,
  39. select,
  40. textarea {
  41. font-family: inherit;
  42. }
  43. code,
  44. pre {
  45. font-family: 'Roboto Mono', sans-serif;
  46. -moz-osx-font-smoothing: auto;
  47. -webkit-font-smoothing: auto;
  48. background-color: ${theme.code.backgroundColor};
  49. color: ${theme.code.color};
  50. font-size: 12px;
  51. font-weight: 400;
  52. padding: 2px 8px;
  53. border-radius: 5px;
  54. width: fit-content;
  55. }
  56. pre {
  57. overflow-x: auto;
  58. white-space: pre
  59. word-wrap: normal
  60. code {
  61. background-color: transparent;
  62. color: currentColor
  63. padding: 0
  64. }
  65. }
  66. a {
  67. color: ${theme.link.color};
  68. cursor: pointer;
  69. text-decoration: none;
  70. &:hover {
  71. color: ${theme.link.hoverColor};
  72. }
  73. }
  74. img {
  75. height: auto;
  76. max-width: 100%;
  77. }
  78. input[type='checkbox'],
  79. input[type='radio'] {
  80. vertical-align: baseline;
  81. }
  82. hr {
  83. background-color: ${theme.hr.backgroundColor};
  84. border: none;
  85. display: block;
  86. height: 1px;
  87. margin: 0;
  88. }
  89. fieldset {
  90. border: none;
  91. }
  92. @keyframes fadein {
  93. from {
  94. opacity: 0;
  95. }
  96. to {
  97. opacity: 1;
  98. }
  99. }
  100. `
  101. );