summaryrefslogtreecommitdiffhomepage
path: root/packages/ui/src/components/markdown.css
blob: 78bd90e1ffa604e780056cee3de61a29303dc1c5 (plain)
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
[data-component="markdown"] {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--text-base);
  text-wrap: pretty;

  strong {
    font-weight: var(--font-weight-medium);
  }

  /* text-12-regular */
  font-family: var(--font-family-sans);
  font-size: var(--font-size-base);
  font-style: normal;
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-large);
  letter-spacing: var(--letter-spacing-normal);

  h1 {
    margin-top: 40px;
    font-weight: var(--font-weight-medium);
    color: var(--text-strong);

    strong {
      font-weight: var(--font-weight-medium);
    }
  }

  h2 {
    margin-top: 32px;
    font-weight: var(--font-weight-medium);
    color: var(--text-strong);

    strong {
      font-weight: var(--font-weight-medium);
    }
  }

  h3 {
    margin-top: 24px;
    font-weight: var(--font-weight-medium);
    color: var(--text-strong);

    strong {
      font-weight: var(--font-weight-medium);
    }
  }

  h1 {
    font-size: 15px;
  }

  p {
    margin-top: 16px;
    margin-bottom: 8px;
  }

  ul,
  ol {
    margin-top: 16px;

    li {
      margin-bottom: 12px;
      line-height: var(--line-height-large);
    }

    li:last-child {
      margin-bottom: 0;
    }
  }

  hr {
    margin-top: 8px;
    margin-bottom: 16px;
    border-color: var(--border-weaker-base);
  }

  .shiki {
    font-size: 13px;
    background: var(--surface-raised-base) !important; /* temporary fix to test style */
    padding: 8px 12px;
    border-radius: 4px;
    border: 0.5px solid var(--border-weak-base);
  }

  pre {
    margin-top: 2rem;
    margin-bottom: 2rem;
    overflow: auto;

    scrollbar-width: none;
    &::-webkit-scrollbar {
      display: none;
    }
  }

  :not(pre) > code {
    font-family: var(--font-family-mono);
    font-feature-settings: var(--font-family-mono--font-feature-settings);
    font-size: 13px;
    /* background-color: var(--surface-base-strong); */
    /* padding: 0.15em 0.35em; */
    /* border-radius: var(--radius-sm); */

    padding: 2px 2px;
    margin: 0 1.5px;
    border-radius: 2px;
    background: var(--surface-base);
    box-shadow: 0 0 0 0.5px var(--border-weak-base);

    /* &::before, */
    /* &::after { */
    /*   content: "\`"; */
    /* } */
  }
}