summaryrefslogtreecommitdiffstats
path: root/assets/scss/_primer/markdown/tables.scss
blob: 83a1a9fafb9db4c32aa2da6b4811bbb8ad0df34d (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%; // keep for backwards compatibility
    width: max-content;
    max-width: 100%;
    overflow: auto;

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

    th,
    td {
      // stylelint-disable-next-line primer/spacing
      padding: 6px 13px;
      border: $border-width $border-style var(--color-markdown-table-border);
    }

    tr {
      background-color: var(--color-bg-primary);
      border-top: $border-width $border-style var(--color-markdown-table-tr-border);

      &:nth-child(2n) {
        background-color: var(--color-bg-tertiary);
      }
    }

    img {
      background-color: transparent;
    }
  }
}