aboutsummaryrefslogtreecommitdiff
path: root/scss/tree.scss
blob: bbca16231973265e12f95b9b1d97274288bdce1d (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
// TODO: refer to sourcehut code AGPL
.tree-list {
  display: grid;
  // mode name
  grid-template-columns: auto 1fr fit-content(40em) auto auto;
  font-family: $font-family-monospace;

  svg {
    color: #777;
  }

  .size {
    text-align: right;
  }

  .name.blob a {
    color: $gray-900;
  }

  .mode, .commit, .commit a, .date, .size {
    color: $gray-700;
  }

  .name.blob {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }

  .commit {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }

  & > div {
    padding: 0.1rem 0.5rem;
    background: transparent;

    &.id {
      text-align: right;
    }

    &.comments {
      text-align: center;
    }

    @for $i from 1 through 5 {
      &:nth-child(5n+#{$i}) {
        grid-column-start: $i;
      }

      // Striped rows
      &:nth-child(10n+#{$i}) {
        background: rgba(0,0,0,.05);
      }
    }
  }
}