summaryrefslogtreecommitdiffstats
path: root/assets/scss/_primer/markdown/tables.scss
blob: 9d73d17a67cb550422b505da785cdee9bce096ec (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
// Needs refactoring
// stylelint-disable selector-max-type
.markdown-body {
  // Tables
  table {
    display: block;
    width: 100%;
    overflow: auto;

    th {
      font-weight: $font-weight-bold;
    }

    th,
    td {
      // stylelint-disable-next-line primer/spacing
      padding: 6px 13px;
      // stylelint-disable-next-line primer/borders
      border: $border-width $border-style lighten($gray-300, 5%);
    }

    tr {
      background-color: $bg-white;
      // stylelint-disable-next-line primer/borders
      border-top: $border-width $border-style darken($gray-300, 4%);

      &:nth-child(2n) {
        background-color: $bg-gray;
      }
    }

    img {
      background-color: transparent;
    }
  }
}