header.scss 10.3 KB
Newer Older
Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
1
.navbar-gitlab {
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
  padding: 0 16px;
  z-index: 1000;
  margin-bottom: 0;
  min-height: $header-height;
  border: 0;
  border-bottom: 1px solid $border-color;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  border-radius: 0;

  .logo-text {
    line-height: initial;

    svg {
      width: 55px;
      height: 14px;
      margin: 0;
      fill: $white-light;
22
    }
23
  }
Annabel Dunstone's avatar
Annabel Dunstone committed
24

Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
25
  .close-icon {
26 27 28 29
    display: none;
  }

  .menu-expanded {
Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
30
    .more-icon {
31 32 33
      display: none;
    }

Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
34
    .close-icon {
35
      display: block;
36
      margin: auto;
37 38 39
    }
  }

40
  .header-content {
Clement Ho's avatar
Clement Ho committed
41
    width: 100%;
Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
42
    display: -webkit-flex;
43
    display: flex;
44
    justify-content: space-between;
45
    position: relative;
46
    min-height: $header-height;
47
    padding-left: 0;
Annabel Dunstone's avatar
Annabel Dunstone committed
48

49
    .title-container {
Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
50
      display: -webkit-flex;
51
      display: flex;
52 53 54
      -webkit-align-items: stretch;
      align-items: stretch;
      -webkit-flex: 1 1 auto;
55
      flex: 1 1 auto;
56 57
      padding-top: 0;
      overflow: visible;
58 59
    }

60
    .title {
61 62 63 64
      padding-right: 0;
      color: currentColor;
      display: -webkit-flex;
      display: flex;
65
      position: relative;
66
      margin: 0;
67
      font-size: 18px;
68 69
      vertical-align: top;
      white-space: nowrap;
70

71 72
      img {
        height: 28px;
73 74 75 76

        + .logo-text {
          margin-left: 8px;
        }
77 78
      }

79 80
      &.wrap {
        white-space: normal;
81 82
      }

83 84
      &.initializing {
        opacity: 0;
85 86
      }

87
      a {
88 89 90 91 92 93
        display: -webkit-flex;
        display: flex;
        align-items: center;
        padding: 2px 8px;
        margin: 5px 2px 5px -8px;
        border-radius: $border-radius-default;
94 95 96 97 98
      }

      .project-item-select {
        right: auto;
        left: 0;
99
      }
100
    }
101

102 103 104 105 106 107
    .dropdown.open {
      > a {
        border-bottom-color: $white-light;
      }
    }

108 109 110 111
    .navbar-collapse > ul.nav > li:not(.d-none) {
      margin: 0 2px;
    }

112
    &.menu-expanded {
Clement Ho's avatar
Clement Ho committed
113
      @include media-breakpoint-down(xs) {
114 115 116 117 118
        .title-container {
          display: none;
        }

        .navbar-collapse {
119
          display: flex;
120 121 122 123 124 125 126
        }
      }
    }
  }

  .navbar-collapse {
    flex: 0 0 auto;
127
    border-top: 0;
128 129
    padding: 0;

Clement Ho's avatar
Clement Ho committed
130
    @include media-breakpoint-down(xs) {
131 132 133 134
      flex: 1 1 auto;
    }

    .nav {
Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
135 136
      flex-wrap: nowrap;

Clement Ho's avatar
Clement Ho committed
137 138
      > li:not(.d-none) a {
        @include media-breakpoint-down(xs) {
139 140 141 142 143 144 145 146
          margin-left: 0;
          min-width: 100%;
        }
      }
    }
  }

  .container-fluid {
147 148 149 150 151 152 153 154
    padding: 0;

    .user-counter {
      svg {
        margin-right: 3px;
      }
    }

155
    .navbar-toggler {
Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
156
      position: relative;
157 158 159 160
      right: -10px;
      border-radius: 0;
      min-width: 45px;
      padding: 0;
Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
161
      margin: $gl-padding-8 -7px $gl-padding-8 0;
162 163 164 165 166 167 168 169 170 171 172 173
      font-size: 14px;
      text-align: center;
      color: currentColor;

      &:hover,
      &:focus,
      &.active {
        color: currentColor;
        background-color: transparent;
      }
    }

174
    .navbar-nav {
Clement Ho's avatar
Clement Ho committed
175
      @include media-breakpoint-down(xs) {
176 177 178
        display: -webkit-flex;
        display: flex;
        padding-right: 10px;
Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
179
        flex-direction: row;
180 181 182
      }

      li {
Clement Ho's avatar
Clement Ho committed
183
        .badge.badge-pill {
184 185 186 187 188 189 190 191
          box-shadow: none;
          font-weight: $gl-font-weight-bold;
        }
      }
    }

    .nav > li {
      &.header-user {
Clement Ho's avatar
Clement Ho committed
192
        @include media-breakpoint-down(xs) {
193 194 195 196 197 198
          padding-left: 10px;
        }
      }

      > a {
        will-change: color;
199
        margin: 4px 0;
200 201 202
        padding: 6px 8px;
        height: 32px;

Clement Ho's avatar
Clement Ho committed
203
        @include media-breakpoint-down(xs) {
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221
          padding: 0;
        }

        &.header-user-dropdown-toggle {
          margin-left: 2px;

          .header-user-avatar {
            margin-right: 0;
          }
        }

        &:hover,
        &:focus {
          text-decoration: none;
          outline: 0;
          opacity: 1;
          color: $white-light;

222 223
          &.header-user-dropdown-toggle .header-user-avatar {
            border-color: $white-light;
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258
          }
        }
      }

      .header-new-dropdown-toggle {
        margin-right: 0;
      }

      .impersonated-user,
      .impersonated-user:hover {
        margin-right: 1px;
        background-color: $white-light;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
      }

      .impersonation-btn,
      .impersonation-btn:hover {
        background-color: $white-light;
        margin-left: 0;
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;

        i {
          color: $orange-500;
          font-size: 20px;
        }
      }
    }
  }
}

.navbar-sub-nav,
.navbar-nav {
  > li {
259 260
    > a,
    > button {
261 262 263 264 265 266 267 268 269 270 271
      display: -webkit-flex;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 6px 8px;
      margin: 4px 2px;
      font-size: 12px;
      color: currentColor;
      border-radius: $border-radius-default;
      height: 32px;
      font-weight: $gl-font-weight-bold;
272 273 274 275 276 277 278 279 280 281 282 283

      &:hover,
      &:focus {
        text-decoration: none;
        outline: 0;
        color: $white-light;
      }
    }

    > button {
      background: transparent;
      border: 0;
284
    }
285 286 287 288 289

    &.line-separator {
      margin: 8px;
    }
  }
Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
290 291 292 293

  .dropdown-menu {
    position: absolute;
  }
294 295 296 297 298 299 300 301 302 303 304
}

.navbar-sub-nav {
  display: -webkit-flex;
  display: flex;
  margin: 0 0 0 6px;

  .dropdown-chevron {
    position: relative;
    top: -1px;
    font-size: 10px;
305 306
  }

307
  .frequent-items-item-select-holder {
308 309 310
    display: inline;
  }

311
  .impersonation i {
312
    color: $red-500;
313
  }
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
314
}
315 316 317 318 319 320 321 322

.caret-down {
  height: 11px;
  width: 11px;
  margin-left: 4px;
  fill: currentColor;
}

Clement Ho's avatar
Clement Ho committed
323 324
.header-user .dropdown-menu,
.header-new .dropdown-menu {
325
  margin-top: $dropdown-vertical-offset;
326 327 328 329 330
}

.breadcrumbs {
  display: -webkit-flex;
  display: flex;
331
  min-height: $breadcrumb-min-height;
332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368
  color: $gl-text-color;
}

.breadcrumbs-container {
  display: -webkit-flex;
  display: flex;
  width: 100%;
  position: relative;
  padding-top: $gl-padding / 2;
  padding-bottom: $gl-padding / 2;
  align-items: center;
  border-bottom: 1px solid $border-color;
}

.breadcrumbs-links {
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
  align-self: center;
  color: $gl-text-color-secondary;

  .avatar-tile {
    margin-right: 4px;
    border: 1px solid $border-color;
    border-radius: 50%;
    vertical-align: sub;
  }

  .text-expander {
    margin-left: 0;
    margin-right: 2px;

    > i {
      position: relative;
      top: 1px;
    }
  }
369 370 371 372 373 374 375 376 377 378

  .dropdown-menu li a .identicon {
    width: 17px;
    height: 17px;
    font-size: $gl-font-size-xs;
    vertical-align: middle;
    text-indent: 0;
    line-height: $gl-font-size-xs + 2px;
    display: inline-block;
  }
379 380 381 382 383 384 385 386
}

.breadcrumbs-list {
  display: -webkit-flex;
  display: flex;
  margin-bottom: 0;
  line-height: 16px;

Clement Ho's avatar
Clement Ho committed
387
  @include media-breakpoint-down(xs) {
388 389 390
    flex-wrap: wrap;
  }

391 392 393 394 395 396 397
  > li {
    display: flex;
    align-items: center;
    position: relative;
    padding: 2px 0;

    &:not(:last-child) {
398 399 400 401 402
      padding-right: 20px;

      &:not(.dropdown) {
        overflow: hidden;
      }
403 404 405 406 407
    }

    > a {
      font-size: 12px;
      color: currentColor;
408 409 410 411
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      flex: 0 1 auto;
412 413 414 415 416 417
    }
  }
}

.breadcrumb-item-text {
  text-decoration: inherit;
418

Clement Ho's avatar
Clement Ho committed
419
  @include media-breakpoint-down(xs) {
420 421
    @include str-truncated(128px);
  }
422 423 424 425
}

.breadcrumbs-list-angle {
  position: absolute;
426
  right: 7px;
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450
  top: 50%;
  color: $gl-text-color-tertiary;
  transform: translateY(-50%);
}

.breadcrumbs-extra {
  display: -webkit-flex;
  display: flex;
  flex: 0 0 auto;
  margin-left: auto;
}

.breadcrumbs-sub-title {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;

  a {
    color: $gl-text-color;
  }
}

.btn-sign-in {
451 452
  background-color: $indigo-100;
  color: $indigo-900;
453
  font-weight: $gl-font-weight-bold;
454
  line-height: 18px;
455
  margin: 4px 0 4px 2px;
456 457 458 459 460 461 462 463

  &:hover {
    background-color: $white-light;
  }
}

.navbar-nav {
  li {
Clement Ho's avatar
Clement Ho committed
464
    .badge.badge-pill {
465 466 467 468 469 470 471 472
      position: inherit;
      font-weight: $gl-font-weight-normal;
      margin-left: -6px;
      font-size: 11px;
      color: $white-light;
      padding: 0 5px;
      line-height: 12px;
      border-radius: 7px;
473
      box-shadow: 0 1px 0 rgba($gl-header-color, 0.2);
474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489

      &.issues-count {
        background-color: $green-500;
      }

      &.merge-requests-count {
        background-color: $orange-600;
      }

      &.todos-count {
        background-color: $blue-500;
      }
    }
  }
}

Clement Ho's avatar
Clement Ho committed
490
@include media-breakpoint-down(xs) {
Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
491
  .navbar-gitlab .container-fluid {
492 493 494 495 496 497 498 499 500 501 502 503 504
    font-size: 18px;

    .navbar-nav {
      table-layout: fixed;
      width: 100%;
      margin: 0;
      text-align: right;
    }

    .navbar-collapse {
      margin-left: -8px;
      margin-right: -10px;

Clement Ho's avatar
Clement Ho committed
505
      .nav > li:not(.d-none) {
506
        flex: 1;
507 508 509 510 511 512 513 514 515 516 517 518 519 520
      }
    }
  }

  .header-user-dropdown-toggle {
    text-align: center;
  }

  .header-user-avatar {
    float: none;
  }
}

.header-user {
521
  &.show .dropdown-menu {
522 523 524 525
    margin-top: 4px;
    color: $gl-text-color;
    left: auto;

526
    li.current-user {
527
      padding: $dropdown-item-padding-y $dropdown-item-padding-x;
528 529 530 531

      .user-name {
        display: block;
      }
532

533
      .user-status {
534
        margin-right: 0;
535
        max-width: 240px;
536
        font-size: $gl-font-size-small;
537 538

        gl-emoji {
539 540 541 542 543 544 545
          font-size: $gl-font-size-small;
        }

        .user-status-emoji {
          gl-emoji {
            font-size: $gl-font-size;
          }
546 547
        }
      }
548
    }
549 550 551 552

    svg {
      vertical-align: text-top;
    }
553 554 555 556 557 558 559
  }
}

.header-user-avatar {
  float: left;
  margin-right: 5px;
  border-radius: 50%;
560
  border: 1px solid $gray-normal;
561 562
}

Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
563
.with-performance-bar .navbar-gitlab {
564 565
  top: $performance-bar-height;
}
566 567

.navbar-empty {
568
  justify-content: center;
569 570 571 572
  height: $header-height;
  background: $white-light;
  border-bottom: 1px solid $white-normal;

573 574 575
  .tanuki-logo,
  .brand-header-logo {
    max-height: 100%;
576 577
  }
}
578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597

.set-user-status-modal {
  .modal-body {
    min-height: unset;
  }

  .input-lg {
    max-width: unset;
  }

  .no-emoji-placeholder,
  .clear-user-status {
    svg {
      fill: $gl-text-color-secondary;
    }
  }

  .emoji-menu-toggle-button {
    @include emoji-menu-toggle-button;
  }
598 599 600 601

  .input-group {
    height: 34px;
  }
602
}
603 604 605 606 607 608 609 610

.nav-links > li > a {
  .badge.badge-pill {
    @include media-breakpoint-down(xs) { display: none; }
  }

  @include media-breakpoint-down(xs) { margin-right: 3px; }
}