global.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. import theme from './theme'
  2. import css from 'styled-jsx/css'
  3. const GlobalStyle = css.global`
  4. @import url('https://fonts.googleapis.com/css?family=Roboto+Mono:300|Roboto:300,900&display=swap');
  5. html {
  6. box-sizing: border-box;
  7. font-size: 12px;
  8. }
  9. *, *:before, *:after {
  10. box-sizing: inherit;
  11. }
  12. body #__next {
  13. display: grid;
  14. grid-template-areas:
  15. "header"
  16. "nav"
  17. "main"
  18. "footer";
  19. grid-template-rows: auto auto 1fr minmax(180px, auto);
  20. padding: 0;
  21. margin: 0;
  22. font-size: 1.5rem;
  23. line-height: 2;
  24. font-family: 'Roboto', sans-serif;
  25. font-weight: 300;
  26. max-width: ${theme.maxWidth};
  27. margin: 0 auto;
  28. }
  29. @media (min-width: 500px) {
  30. body #__next {
  31. grid-template-areas:
  32. "header nav"
  33. "main main"
  34. "footer footer";
  35. grid-template-columns: auto 1fr;
  36. grid-template-rows: auto 1fr minmax(180px, auto);
  37. }
  38. }
  39. header {
  40. grid-area: header;
  41. }
  42. nav {
  43. grid-area: nav;
  44. }
  45. main {
  46. grid-area: main;
  47. }
  48. footer {
  49. grid-area: footer;
  50. }
  51. #__next {
  52. background: ${theme.colors.offWhite};
  53. color: ${theme.colors.black};
  54. box-shadow: ${theme.bs};
  55. }
  56. h1, h2, h3, h4, h5, h6 {
  57. font-weight: 900;
  58. }
  59. button {
  60. font-weight: 900;
  61. background: ${theme.colors.darkblue};
  62. color: ${theme.colors.lighterblue};
  63. border: 1px solid ${theme.colors.darkerblue};
  64. padding: 0.3em 1.8em;
  65. cursor: pointer;
  66. box-shadow: ${theme.bsSmall};
  67. }
  68. input,
  69. textarea {
  70. border: 1px solid ${theme.colors.lightgrey};
  71. padding: 6px;
  72. margin: 0 8px;
  73. background: transparent;
  74. }
  75. pre {
  76. font-family: 'Roboto Mono', monospace;
  77. }
  78. `
  79. export default GlobalStyle