summaryrefslogtreecommitdiff
path: root/app/assets/stylesheets/pages/status.scss
blob: 67ad1ae60afe84aae637e0e6d368e94d2340e3ca (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
@mixin status-color($color-light, $color-main, $color-dark) {
  color: $color-main;
  border-color: $color-main;

  &:not(span):hover {
    background-color: $color-light;
    color: $color-dark;
    border-color: $color-dark;

    svg {
      fill: $color-dark;
    }
  }

  svg {
    fill: $color-main;
  }
}

.ci-status {
  padding: 2px 7px 4px;
  border: 1px solid $gray-darker;
  white-space: nowrap;
  border-radius: 4px;

  &:hover,
  &:focus {
    text-decoration: none;
  }

  svg {
    height: 13px;
    width: 13px;
    position: relative;
    top: 2px;
    overflow: visible;
  }

  &.ci-failed {
    @include status-color($red-50, $red-500, $red-600);
  }

  &.ci-success {
    @include status-color($green-50, $green-500, $green-700);
  }

  &.ci-canceled,
  &.ci-disabled,
  &.ci-manual {
    color: $gl-text-color;
    border-color: $gl-text-color;

    &:not(span):hover {
      background-color: rgba($gl-text-color, .07);
    }
  }

  &.ci-pending,
  &.ci-failed_with_warnings,
  &.ci-success_with_warnings {
    @include status-color($orange-50, $orange-500, $orange-700);
  }

  &.ci-info,
  &.ci-running {
    @include status-color($blue-50, $blue-500, $blue-600);
  }

  &.ci-created,
  &.ci-skipped {
    color: $gl-text-color-secondary;
    border-color: $gl-text-color-secondary;

    &:not(span):hover {
      background-color: rgba($gl-text-color-secondary, .07);
    }

    svg {
      fill: $gl-text-color-secondary;
    }
  }
}

.visible-xs-inline {
  .ci-status-link {
    position: relative;
    top: 2px;
    left: 5px;
  }
}

.ci-status-link {
  svg {
    overflow: visible;
  }
}