aboutsummaryrefslogtreecommitdiff
path: root/assets/_markdown.scss
blob: 96ba8f80ca5701328de2837652f4ba671c22d9cb (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
@import 'variables';

.markdown {
  line-height: 1.6;

  h1, h2, h3, h4, h5 {
    font-weight: normal;
    line-height: 1;
    margin-top: 1.5em;
    margin-bottom: $padding-16;
  }

  // remove padding at the beginning of page
  > :first-child {
    margin-top: 0;
  }

  b, optgroup, strong {
    font-weight: bolder;
  }
  
  a {
    text-decoration: none;

    &:hover {
      text-decoration: underline;
    }
  }

  img {
    max-width: 100%;
  }

  code {
    padding: 0 $padding-4;
    background: $gray-200;
    border-radius: $border-radius;
    font-size: .875em;
  }

  pre {
    padding: $padding-16;
    background: $gray-100;
    border-radius: $border-radius;
    overflow-x: auto;

    code {
      padding: 0;
      background: none;
    }
  }

  blockquote {
    margin: $padding-16 0;
    padding: $padding-4 ($padding-16 - $padding-4); //to keep total left space 16dp

    border-left: $padding-4 solid $gray-200;
    border-radius: $border-radius;

    :first-child { margin-top: 0; }
    :last-child { margin-bottom: 0; }
  }

  table {
    border-spacing: 0;
    border-collapse: collapse;
    margin-top: $padding-16;
    margin-bottom: $padding-16;
  
    tr th, tr td {
      padding: $padding-8 $padding-16;
      line-height: 1;
      border: $padding-1 solid $gray-200;
    }

    tr:nth-child(2n) {
      background: $gray-100;
    }
  }

  hr {
    height: $padding-1;
    border: none;
    background: $gray-200;
  }

  ul, ol {
    padding-left: $padding-16 * 2;
  }

  dl {
    // padding-left: $padding-16;
    dt {
      font-weight: bolder;
      margin-top: $padding-16;
    }

    dd {
      margin-left: $padding-16 * 2;
    }
  }
}