summaryrefslogtreecommitdiff
path: root/app/assets/stylesheets/page_bundles/pipelines.scss
blob: ae36f7e3ac1aeafc372c6e092da5f9caf31cea84 (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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
@import 'mixins_and_variables_and_functions';
@import './pipeline_mixins';

/**
 * Pipelines Bundle: Pipeline lists and Mini Pipelines
 */

.pipelines-container .top-area .nav-controls > .btn:last-child {
  float: none;
}

// Pipelines list
// Should affect pipelines table components rendered by:
// - app/assets/javascripts/commit/pipelines/pipelines_bundle.js

.pipelines {
  .badge {
    margin-bottom: 3px;
  }

  .pipeline-actions {
    min-width: 170px; //Guarantees buttons don't break in several lines.

    .btn-default {
      color: var(--gray-500, $gray-500);
    }

    .btn.btn-retry:hover,
    .btn.btn-retry:focus {
      border-color: $dropdown-toggle-active-border-color;
      background-color: $white-normal;
    }

    svg path {
      fill: var(--gray-500, $gray-500);
    }

    .dropdown-menu {
      max-height: $dropdown-max-height;
      overflow-y: auto;
    }

    .dropdown-toggle,
    .dropdown-menu {
      color: var(--gray-500, $gray-500);
    }

    .btn-group.open .btn-default {
      background-color: $white-normal;
      border-color: $border-white-normal;
    }

    .btn .text-center {
      display: inline;
    }

    .tooltip {
      white-space: nowrap;
    }
  }

  .pipeline-tags .label-container {
    white-space: normal;
  }
}

// Mini Pipelines

.stage-cell {
  .mini-pipeline-graph-dropdown-toggle,
  .mini-pipeline-graph-gl-dropdown-toggle {
    svg {
      height: $ci-action-icon-size;
      width: $ci-action-icon-size;
      position: absolute;
      top: -1px;
      left: -1px;
      z-index: 2;
      overflow: visible;
    }

    &:hover,
    &:active,
    &:focus {
      svg {
        top: -2px;
        left: -2px;
      }
    }
  }

  .stage-container {
    display: inline-block;
    position: relative;
    vertical-align: middle;
    height: $ci-action-icon-size;
    margin: 3px 0;

    + .stage-container {
      margin-left: 6px;
    }

    // Hack to show a button tooltip inline
    button.has-tooltip + .tooltip {
      min-width: 105px;
    }

    // Bootstrap way of showing the content inline for anchors.
    a.has-tooltip {
      white-space: nowrap;
    }

    &:not(:last-child) {
      &::after {
        content: '';
        width: 7px;
        position: absolute;
        right: -7px;
        top: 11px;
        border-bottom: 2px solid $border-color;
      }
    }

    //delete when all pipelines are updated to new size
    &.mr-widget-pipeline-stages {
      + .stage-container {
        margin-left: 4px;
      }

      &:not(:last-child) {
        &::after {
          width: 4px;
          right: -4px;
          top: 11px;
        }
      }
    }
  }
}

// Dropdown button in mini pipeline graph
button.mini-pipeline-graph-dropdown-toggle,
// As the `mini-pipeline-item` mixin specificity is lower
// than the toggle of dropdown with 'variant="link"' we add
// classes ".gl-button.btn-link" to make it more specific.
// Once FF ci_mini_pipeline_gl_dropdown is removed, the `mini-pipeline-item`
// itself could increase its specificity to simplify this selector
button.gl-button.btn-link.mini-pipeline-graph-gl-dropdown-toggle {
  @include mini-pipeline-item();
}

// Action icons inside dropdowns:
// mini graph in pipelines table
// mini graph in MR widget pipeline
// mini graph in Commit widget pipeline
.mini-pipeline-graph-dropdown-menu {
  @include pipeline-graph-dropdown-menu();

  &::before,
  &::after {
    content: '';
    display: inline-block;
    position: absolute;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    top: -6px;
    left: 50%;
    transform: translate(-50%, 0);
    border-width: 0 5px 6px;

    @include media-breakpoint-down(sm) {
      left: 100%;
      margin-left: -12px;
    }
  }

  &::before {
    border-width: 0 5px 5px;
    border-bottom-color: $border-color;
  }

  &::after {
    margin-top: 1px;
    border-bottom-color: $white;
  }

  /**
   * Center dropdown menu in mini graph
   */
  .dropdown &.dropdown-menu {
    transform: translate(-80%, 0);

    @media (min-width: map-get($grid-breakpoints, md)) {
      transform: translate(-50%, 0);
      right: auto;
      left: 50%;
    }
  }
}