BigW Consortium Gitlab

lists.scss 7.33 KB
Newer Older
1 2 3 4 5
/**
 * Well styled list
 *
 */
.well-list {
Phil Hughes committed
6
  position: relative;
7
  margin: 0;
Dmitriy Zaporozhets committed
8
  padding: 0;
9
  list-style: none;
Dmitriy Zaporozhets committed
10

11
  > li {
12
    padding: 10px 15px;
13
    min-height: 20px;
14
    border-bottom: 1px solid $list-border;
15

16
    &::after {
17 18 19 20 21
      content: " ";
      display: table;
      clear: both;
    }

22
    &.disabled {
23
      color: $list-text-disabled-color;
24 25
    }

26 27 28 29 30 31
    &.unstyled {
      &:hover {
        background: none;
      }
    }

32
    &.warning-row {
33 34 35
      background-color: $list-warning-row-bg;
      border-color: $list-warning-row-border;
      color: $list-warning-row-color;
36 37
    }

38
    &.smoke { background-color: $gray-light; }
39

40
    &:not(.ui-sort-disabled):hover {
41
      background: $row-hover;
42
    }
43 44

    &:last-child {
45
      border-bottom: 0;
46 47

      &.bottom {
48
        background: $gray-light;
49
      }
50 51
    }

52 53 54 55 56 57
    .list-item-name {
      float: left;
      position: relative;
      top: 3px;
    }

58
    p {
59
      padding-top: 1px;
60
      margin: 0;
61
      color: $white-normal;
62

63
      img {
64 65
        position: relative;
        top: 3px;
66 67
      }
    }
68 69

    .well-title {
70
      font-size: $list-font-size;
71 72
      line-height: 18px;
    }
73 74
  }
}
randx committed
75

76 77

/** light list with border-bottom between li **/
78 79
ul.bordered-list,
ul.unstyled-list {
80
  @include basic-list;
81 82 83 84

  &.top-list {
    li:first-child {
      padding-top: 0;
85

86 87
      h4,
      h5 {
88 89 90 91
        margin-top: 0;
      }
    }
  }
92
}
93

94
ul.unstyled-list > li {
95
  border-bottom: 0;
96 97
}

98
// Generic content list
99 100 101 102 103
ul.content-list {
  @include basic-list;
  margin: 0;
  padding: 0;

104
  li {
105
    border-color: $white-normal;
106
    font-size: $list-font-size;
107
    color: $list-text-color;
108

109 110 111 112 113 114
    &.no-description {
      .title {
        line-height: $list-text-height;
      }
    }

115
    .title {
116
      font-weight: $gl-font-weight-bold;
117
    }
118

119
    a {
120
      color: $gl-text-color;
121 122
    }

Phil Hughes committed
123
    .member-group-link {
124
      color: $blue-600;
Phil Hughes committed
125 126
    }

127 128 129 130 131 132 133
    .description {
      p {
        @include str-truncated;
        margin-bottom: 0;
      }
    }

Dmitriy Zaporozhets committed
134 135
    .controls {
      float: right;
136

137 138
      > .control-text {
        margin-right: $gl-padding-top;
139
        line-height: $list-text-height;
140 141 142 143 144 145

        &:last-child {
          margin-right: 0;
        }
      }

146
      > .btn,
147 148
      > .btn-group,
      > .dropdown.inline {
149 150
        margin-right: $gl-padding-top;
        display: inline-block;
151
        margin-top: 3px;
152
        margin-bottom: 4px;
153

154
        &.has-tooltip,
155 156
        &:last-child {
          margin-right: 0;
157 158 159 160

          @media(max-width: $screen-xs-max) {
            margin: 0 auto;
          }
161
        }
162
      }
163 164

      .no-comments {
165
        opacity: .5;
166
      }
Dmitriy Zaporozhets committed
167
    }
168

169 170
    .member-controls {
      float: none;
Phil Hughes committed
171 172

      @media (min-width: $screen-sm-min) {
173 174 175 176
        float: right;
      }
    }

177 178
    // When dragging a list item
    &.ui-sortable-helper {
179
      border-bottom: 0;
180 181 182 183
    }

    &.list-placeholder {
      background-color: $gray-light;
184
      border: dotted 1px $white-normal;
185
      margin: 1px 0;
186
      min-height: 52px;
187
    }
188 189 190
  }
}

191 192 193 194 195 196
// Content list using flexbox
.flex-list {
  .flex-row {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
197
    align-items: center;
198 199 200 201 202 203 204 205 206
    white-space: nowrap;
  }

  .row-main-content {
    flex: 1 1 auto;
    overflow: hidden;
    padding-right: 8px;
  }

207 208 209 210 211
  .row-fixed-content {
    flex: 0 0 auto;
    margin-left: auto;
  }

212
  .row-title {
213
    font-weight: $gl-font-weight-bold;
214 215 216 217 218 219 220 221 222 223 224 225 226 227
  }

  .row-second-line {
    display: block;
  }

  .dropdown {
    .btn-block {
      margin-bottom: 0;
      line-height: inherit;
    }
  }

  .label-default {
228
    color: $gl-text-color-secondary;
229
  }
230 231 232 233

  .avatar-cell {
    align-self: flex-start;
  }
234 235
}

236 237 238 239
.panel > .content-list > li {
  padding: $gl-padding-top $gl-padding;
}

240 241 242
ul.controls {
  float: right;
  list-style: none;
243 244
  display: flex;
  align-items: center;
245 246 247 248 249 250 251

  .btn {
    padding: 10px 14px;
  }

  > li {
    float: left;
252
    margin-right: 10px;
253

254 255 256
    &:last-child {
      margin-right: 0;
    }
257 258 259 260 261 262 263

    .author_link {
      display: inline-block;

      .avatar-inline {
        margin-left: 0;
        margin-right: 0;
264
        margin-bottom: 0;
265 266 267
      }
    }
  }
268 269 270 271 272 273

  .issuable-pipeline-broken a,
  .issuable-pipeline-status a,
  .author_link {
    display: flex;
  }
274
}
275 276 277 278

ul.indent-list {
  padding: 10px 0 0 30px;
}
279 280 281


// Specific styles for tree list
282 283 284 285 286 287 288 289 290 291 292 293 294 295
@keyframes spin-avatar {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.groups-list-tree-container {
  .has-no-search-results {
    text-align: center;
    padding: $gl-padding;
    font-style: italic;
    color: $well-light-text-color;
  }

  > .group-list-tree > .group-row.has-children:first-child {
296
    border-top: 0;
297 298 299
  }
}

300 301 302
.group-list-tree {
  .avatar-container.content-loading {
    position: relative;
303

304 305 306 307 308
    > a,
    > a .avatar {
      height: 100%;
      border-radius: 50%;
    }
309

310 311
    > a {
      padding: 2px;
312

313 314
      .avatar {
        border: 2px solid $white-normal;
315

316 317 318 319
        &.identicon {
          line-height: 30px;
        }
      }
320 321
    }

322 323 324 325 326 327 328 329 330 331
    &::after {
      content: "";
      position: absolute;
      height: 100%;
      width: 100%;
      background-color: transparent;
      border: 2px outset $kdb-border;
      border-radius: 50%;
      animation: spin-avatar 3s infinite linear;
    }
332 333
  }

334 335 336 337 338 339 340 341 342 343 344
  .folder-toggle-wrap {
    float: left;
    line-height: $list-text-height;
    font-size: 0;

    span {
      font-size: $gl-font-size;
    }
  }

  .folder-caret,
345
  .item-type-icon {
346 347 348 349 350 351 352
    display: inline-block;
  }

  .folder-caret {
    width: 15px;
  }

353
  .item-type-icon {
354 355 356
    width: 20px;
  }

357
  > .group-row:not(.has-children) {
358 359 360 361 362 363 364 365 366 367 368
    .folder-caret .fa {
      opacity: 0;
    }
  }

  .content-list li:last-child {
    padding-bottom: 0;
  }

  .group-list-tree {
    margin-bottom: 0;
369
    margin-left: 30px;
370 371
    position: relative;

372
    &::before {
373 374 375 376
      content: '';
      display: block;
      width: 0;
      position: absolute;
377
      top: 5px;
378 379 380 381 382 383 384
      bottom: 0;
      left: -16px;
      border-left: 2px solid $border-white-normal;
    }

    .group-row {
      position: relative;
385 386

      &::before {
387 388 389 390 391 392 393 394 395 396
        content: "";
        display: block;
        width: 10px;
        height: 0;
        border-top: 2px solid $border-white-normal;
        position: absolute;
        top: 30px;
        left: -16px;
      }

397 398
      &:last-child::before {
        background: $white-light;
399 400 401 402
        height: auto;
        top: 30px;
        bottom: 0;
      }
403 404 405 406

      &.being-removed {
        opacity: 0.5;
      }
407 408
    }
  }
Alfredo Sumaran committed
409

410 411
  .group-row {
    padding: 0;
412 413

    &.has-children {
414
      border-top: 0;
415 416 417 418 419
    }

    &:first-child {
      border-top: 1px solid $white-normal;
    }
420 421 422 423 424 425

    &:last-of-type {
      .group-row-contents:not(:hover) {
        border-bottom: 1px solid transparent;
      }
    }
426 427 428
  }

  .group-row-contents {
Alfredo Sumaran committed
429
    padding: 10px 10px 8px;
430 431 432
    border-top: solid 1px transparent;
    border-bottom: solid 1px $white-normal;

Alfredo Sumaran committed
433
    &:hover {
434 435
      border-color: $row-hover-border;
      background-color: $row-hover;
Alfredo Sumaran committed
436
      cursor: pointer;
437
    }
438 439 440 441

    .avatar-container > a {
      width: 100%;
    }
442 443 444 445 446 447 448 449

    &.has-more-items {
      display: block;
      padding: 20px 10px;
    }
  }
}

450 451 452 453 454 455
.namespace-title {
  .tooltip-inner {
    max-width: 350px;
  }
}

456 457
ul.group-list-tree {
  li.group-row {
458 459
    &.has-description .title {
      line-height: inherit;
460 461
    }

462
    &:not(.has-description) .title {
463 464
      line-height: $list-text-height;
    }
465
  }
466
}
467 468 469 470 471 472 473

.js-groups-list-holder {
  .groups-list-loading {
    font-size: 34px;
    text-align: center;
  }
}