aboutsummaryrefslogtreecommitdiffstats
path: root/packages/dev-tools-pages/ts/globalStyles.tsx
blob: c0cf466739d218ea350181c8c593fb15927d0955 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import { createGlobalStyle } from 'styled-components';
import styledNormalize from 'styled-normalize';
import hljsStyles from 'highlight.js/styles/github-gist.css';

import { withContext } from 'ts/components/withContext';

const BaseStyles = createGlobalStyle`
  ${styledNormalize}
  ${hljsStyles}

  @font-face {
    font-family: "Maison Neue";
    src: url("/fonts/MaisonNeue-Book-subset.woff2") format("woff2"), url("/fonts/MaisonNeue-Book-subset.woff") format("woff");
    font-weight: 300;
    font-display: swap;
    unicode-range: U+20-7E;
  }
  @font-face {
    font-family: "Maison Neue";
    src: url("/fonts/MaisonNeue-Bold-subset.woff2") format("woff2"), url("/fonts/MaisonNeue-Bold-subset.woff") format("woff");
    font-weight: 500;
    font-display: swap;
    unicode-range: U+20-7E;
  }
  @font-face {
    font-family: "Maison Neue Mono";
    src: url("/fonts/MaisonNeue-Mono-subset.woff2") format("woff2"), url("/fonts/MaisonNeue-Mono-subset.woff") format("woff");
    font-weight: 300;
    font-display: optional;
    unicode-range: U+20-7E;
  }

  html {
    font-size: 100%;
    box-sizing: border-box;
  }
  
  *, *::before, *::after {
    box-sizing: inherit;
  }
  
  body {
    font-family: "Maison Neue", system-ui, sans-serif;
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.8;
  }

  a {
  color: ${(props: any) => props.colors.link};
    text-decoration: none; 

    &:hover {
      color: red; //what should this be?
    }
  }
  
  h1, h2, h3, h4 {
    font-weight: 500;
    margin: 0;
  }

  p {
    margin-top: 0;
    margin-bottom: 1em;
    &:not([class]):last-of-type {
      margin-bottom: 0;
    }
  }

  code {
    font-family: "Maison Neue Mono", monospace;
  }
`;

export default withContext(BaseStyles);