global.js 1.7 KB

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