summaryrefslogtreecommitdiffstats
path: root/assets/sass/@primer/css/timeline/timeline-item.scss
blob: 6f6ff4da89f98f3d687de6507a1660a0c5837720 (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
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
.TimelineItem {
  position: relative;
  display: flex;
  padding: $spacer-3 0;
  margin-left: $spacer-3;

  // The Timeline
  &::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    display: block;
    width: 2px;
    content: "";
    // stylelint-disable-next-line primer/colors
    background-color: $gray-200;
  }

  &:target .TimelineItem-badge {
    // stylelint-disable-next-line primer/borders
    border-color: $blue-400;
    // stylelint-disable-next-line primer/box-shadow
    box-shadow: 0 0 0.2em $blue-200;
  }
}

.TimelineItem-badge {
  position: relative;
  z-index: 1;
  display: flex;
  width: $spacer-5;
  height: $spacer-5;
  margin-right: $spacer-2;
  margin-left: -$spacer-3 + 1;
  // stylelint-disable-next-line primer/colors
  color: $gray-700;
  align-items: center;
  // stylelint-disable-next-line primer/colors
  background-color: $gray-200;
  // stylelint-disable-next-line primer/borders
  border: 2px $border-style $border-white;
  border-radius: 50%;
  justify-content: center;
  flex-shrink: 0;
}

.TimelineItem-body {
  min-width: 0;
  max-width: 100%;
  margin-top: $spacer-1;
  // stylelint-disable-next-line primer/colors
  color: $gray-700;
  flex: auto;
}

.TimelineItem-avatar {
  position: absolute;
  left: -($spacer-6 + $spacer-5);
  z-index: 1;
}

.TimelineItem-break {
  position: relative;
  z-index: 1;
  height: $spacer-4;
  margin: 0;
  margin-bottom: -$spacer-3;
  // stylelint-disable-next-line primer/spacing
  margin-left: -($spacer-6 + $spacer-3);
  background-color: $bg-white;
  border: 0;
  // stylelint-disable-next-line primer/borders
  border-top: 4px $border-style $border-color;
}

.TimelineItem--condensed {
  padding-top: $spacer-1;
  padding-bottom: 0;

  // TimelineItem--condensed is often grouped. (commits)
  &:last-child {
    padding-bottom: $spacer-3;
  }

  .TimelineItem-badge {
    height: $spacer-3;
    margin-top: $spacer-2;
    margin-bottom: $spacer-2;
    // stylelint-disable-next-line primer/colors
    color: $gray-400;
    background-color: $bg-white;
    border: 0;
  }
}