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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
@mixin icon-styles($color) {
svg,
.gl-icon {
fill: $color;
}
}
.ci-status-icon-success,
.ci-status-icon-passed {
@include icon-styles($green-500);
}
.ci-status-icon-error,
.ci-status-icon-failed {
@include icon-styles($red-500);
}
.ci-status-icon-pending,
.ci-status-icon-waiting-for-resource,
.ci-status-icon-waiting-for-callback,
.ci-status-icon-failed-with-warnings,
.ci-status-icon-success-with-warnings {
@include icon-styles($orange-500);
}
.ci-status-icon-running {
@include icon-styles($blue-500);
}
.ci-status-icon-canceled,
.ci-status-icon-disabled,
.ci-status-icon-scheduled,
.ci-status-icon-manual {
@include icon-styles($gray-900);
}
.ci-status-icon-notification,
.ci-status-icon-preparing,
.ci-status-icon-created,
.ci-status-icon-skipped,
.ci-status-icon-notfound {
@include icon-styles($gray-500);
}
.ci-icon {
// .ci-icon class is used at
// - app/assets/javascripts/vue_shared/components/ci_icon.vue
// - app/helpers/ci/status_helper.rb
.ci-icon-gl-icon-wrapper {
@include gl-rounded-full;
@include gl-line-height-0;
}
// Makes the borderless CI icons appear slightly bigger than the default 16px.
// Could be fixed by making the SVG fill up the canvas in a follow up issue.
.gl-icon {
// fill: currentColor;
width: 20px;
height: 20px;
margin: -2px;
}
@mixin ci-icon-style($bg-color, $color, $gl-dark-bg-color: null, $gl-dark-color: null) {
.ci-icon-gl-icon-wrapper {
background-color: $bg-color;
color: $color;
.gl-dark & {
background-color: $gl-dark-bg-color;
color: $gl-dark-color;
}
}
}
&.ci-icon-variant-success {
@include ci-icon-style($green-500, $white, $green-600, $green-50)
}
&.ci-icon-variant-warning {
@include ci-icon-style($orange-500, $white, $orange-600, $orange-50)
}
&.ci-icon-variant-danger {
@include ci-icon-style($red-500, $white, $red-600, $red-50)
}
&.ci-icon-variant-info {
@include ci-icon-style($white, $blue-500, $blue-600, $blue-50)
}
&.ci-icon-variant-neutral {
@include ci-icon-style($white, $gray-500)
}
}
.password-status-icon-success {
svg {
vertical-align: middle;
fill: $green-500;
}
}
.icon-link {
&:hover {
text-decoration: none;
}
}
.user-avatar-link {
text-decoration: none;
}
.circle-icon-container {
$border-size: 1px;
display: flex;
align-items: center;
justify-content: center;
color: $gray-500;
}
|