new-nav.scss 8.3 KB
Newer Older
A
Annabel Dunstone Gray 已提交
1 2 3 4
.content-wrapper.page-with-new-nav {
  margin-top: $new-navbar-height;
}

P
Phil Hughes 已提交
5
header.navbar-gitlab-new {
P
Phil Hughes 已提交
6
  color: $white-light;
P
Phil Hughes 已提交
7
  border-bottom: 0;
A
Annabel Dunstone Gray 已提交
8
  min-height: $new-navbar-height;
P
Phil Hughes 已提交
9

10 11 12 13 14 15 16 17 18 19 20
  .logo-text {
    line-height: initial;

    svg {
      width: 55px;
      height: 14px;
      margin: 0;
      fill: $white-light;
    }
  }

P
Phil Hughes 已提交
21
  .header-content {
P
Phil Hughes 已提交
22 23
    display: -webkit-flex;
    display: flex;
P
Phil Hughes 已提交
24
    padding-left: 0;
A
Annabel Dunstone Gray 已提交
25
    min-height: $new-navbar-height;
P
Phil Hughes 已提交
26 27

    .title-container {
P
Phil Hughes 已提交
28 29 30
      display: -webkit-flex;
      display: flex;
      -webkit-align-items: stretch;
31
      align-items: stretch;
P
Phil Hughes 已提交
32 33
      -webkit-flex: 1 1 auto;
      flex: 1 1 auto;
P
Phil Hughes 已提交
34 35 36 37 38
      padding-top: 0;
      overflow: visible;
    }

    .title {
P
Phil Hughes 已提交
39
      display: -webkit-flex;
40
      display: flex;
P
Phil Hughes 已提交
41
      padding-right: 0;
P
Phil Hughes 已提交
42 43
      color: currentColor;

44 45
      img {
        height: 28px;
46
        margin-right: 8px;
47 48
      }

49
      a {
P
Phil Hughes 已提交
50
        display: -webkit-flex;
P
Phil Hughes 已提交
51 52
        display: flex;
        align-items: center;
A
Annabel Dunstone Gray 已提交
53 54 55
        padding: 2px 8px;
        margin: 5px 2px 5px -8px;
        border-radius: $border-radius-default;
P
Phil Hughes 已提交
56 57

        svg {
P
Phil Hughes 已提交
58
          @media (min-width: $screen-sm-min) {
A
Annabel Dunstone Gray 已提交
59
            margin-right: 8px;
P
Phil Hughes 已提交
60
          }
P
Phil Hughes 已提交
61
        }
P
Phil Hughes 已提交
62 63 64 65 66
      }
    }

    .dropdown.open {
      > a {
P
Phil Hughes 已提交
67
        border-bottom-color: $white-light;
P
Phil Hughes 已提交
68 69 70 71 72 73
      }
    }

    .dropdown-menu {
      margin-top: 4px;
      min-width: 130px;
P
Phil Hughes 已提交
74 75 76 77 78

      @media (max-width: $screen-xs-max) {
        left: auto;
        right: 0;
      }
P
Phil Hughes 已提交
79
    }
A
Annabel Dunstone Gray 已提交
80 81 82 83 84 85 86 87 88 89 90 91 92 93

    &.menu-expanded {
      @media (max-width: $screen-xs-max) {
        .title-container,
        .header-logo, {
          display: none;
        }
      }
    }
  }

  .dropdown-bold-header {
    color: $gl-text-color-secondary;
    font-size: 12px;
P
Phil Hughes 已提交
94 95 96
  }

  .navbar-collapse {
P
Phil Hughes 已提交
97
    padding-left: 0;
P
Phil Hughes 已提交
98
    box-shadow: 0;
P
Phil Hughes 已提交
99 100

    @media (max-width: $screen-xs-max) {
A
Annabel Dunstone Gray 已提交
101
      margin-left: -8px;
P
Phil Hughes 已提交
102 103 104 105 106 107 108 109 110 111 112
      margin-right: -10px;
    }

    .nav {
      > li:not(.hidden-xs) a {
        @media (max-width: $screen-xs-max) {
          margin-left: 0;
          min-width: 100%;
        }
      }
    }
P
Phil Hughes 已提交
113 114 115 116
  }

  .container-fluid {
    .navbar-toggle {
P
Phil Hughes 已提交
117
      min-width: 45px;
118
      padding: 0 $gl-padding;
P
Phil Hughes 已提交
119
      margin-right: -7px;
P
Phil Hughes 已提交
120
      text-align: center;
P
Phil Hughes 已提交
121
      color: currentColor;
P
Phil Hughes 已提交
122

123 124 125 126
      svg {
        fill: currentColor;
      }

P
Phil Hughes 已提交
127 128 129 130 131
      &:hover,
      &:focus,
      &.active {
        color: currentColor;
        background-color: transparent;
132 133 134 135

        svg {
          fill: currentColor;
        }
P
Phil Hughes 已提交
136 137 138 139 140
      }
    }

    .navbar-nav {
      @media (max-width: $screen-xs-max) {
P
Phil Hughes 已提交
141
        display: flex;
P
Phil Hughes 已提交
142 143
        padding-right: 10px;
      }
P
Phil Hughes 已提交
144 145 146 147

      li {
        .badge {
          box-shadow: none;
148
          font-weight: $gl-font-weight-bold;
P
Phil Hughes 已提交
149 150
        }
      }
P
Phil Hughes 已提交
151 152
    }

P
Phil Hughes 已提交
153 154 155 156
    .nav > li {
      &.header-user {
        @media (max-width: $screen-xs-max) {
          padding-left: 10px;
P
Phil Hughes 已提交
157
        }
P
Phil Hughes 已提交
158 159 160
      }

      > a {
161
        will-change: color;
A
Annabel Dunstone Gray 已提交
162 163 164 165 166 167 168 169
        margin: 4px 2px;
        padding: 6px 8px;
        height: 32px;

        @media (max-width: $screen-xs-max) {
          padding: 0;
        }

P
Phil Hughes 已提交
170
        &.header-user-dropdown-toggle {
A
Annabel Dunstone Gray 已提交
171 172
          margin-left: 2px;

P
Phil Hughes 已提交
173
          .header-user-avatar {
A
Annabel Dunstone Gray 已提交
174
            margin-right: 0;
P
Phil Hughes 已提交
175 176
          }
        }
A
Annabel Dunstone Gray 已提交
177

178 179 180 181 182 183
        &:hover,
        &:focus {
          text-decoration: none;
          outline: 0;
          opacity: 1;
          color: $white-light;
A
Annabel Dunstone Gray 已提交
184

185 186 187
          svg {
            fill: currentColor;
          }
R
Rubén Dávila 已提交
188

189 190 191 192
          &.header-user-dropdown-toggle {
            .header-user-avatar {
              border-color: $white-light;
            }
R
Rubén Dávila 已提交
193 194
          }
        }
A
Annabel Dunstone Gray 已提交
195 196
      }

197 198 199 200
      .header-new-dropdown-toggle {
        margin-right: 0;
      }

A
Annabel Dunstone Gray 已提交
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228
      .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;
        }
      }

      &.active > a,
      &.dropdown.open > a {

        svg {
          fill: currentColor;
        }
      }
P
Phil Hughes 已提交
229 230 231 232 233
    }
  }
}

.navbar-sub-nav {
P
Phil Hughes 已提交
234
  display: -webkit-flex;
P
Phil Hughes 已提交
235
  display: flex;
A
Annabel Dunstone Gray 已提交
236
  margin: 0 0 0 6px;
P
Phil Hughes 已提交
237

A
Annabel Dunstone Gray 已提交
238 239 240 241 242 243
  .dropdown-chevron {
    position: relative;
    top: -1px;
    font-size: 10px;
  }
}
244

A
Annabel Dunstone Gray 已提交
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278
.navbar-gitlab-new {
  .navbar-sub-nav,
  .navbar-nav {
    > li {
      > a:hover,
      > a:focus {
        text-decoration: none;
        outline: 0;
        color: $white-light;

        svg {
          fill: currentColor;
        }
      }

      > a {
        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;

        svg {
          fill: currentColor;
        }
      }

      &.line-separator {
        margin: 8px;
P
Phil Hughes 已提交
279 280 281
      }
    }
  }
A
Annabel Dunstone Gray 已提交
282
}
P
Phil Hughes 已提交
283

A
Annabel Dunstone Gray 已提交
284 285 286 287 288
.caret-down {
  height: 11px;
  width: 11px;
  margin-left: 4px;
  fill: currentColor;
P
Phil Hughes 已提交
289 290
}

P
Phil Hughes 已提交
291 292
.header-user .dropdown-menu-nav,
.header-new .dropdown-menu-nav {
293
  margin-top: $dropdown-vertical-offset;
P
Phil Hughes 已提交
294 295
}

P
Phil Hughes 已提交
296 297
.breadcrumbs {
  display: flex;
P
Phil Hughes 已提交
298
  min-height: 48px;
P
Phil Hughes 已提交
299 300 301 302
  color: $gl-text-color;
}

.breadcrumbs-container {
303
  display: -webkit-flex;
P
Phil Hughes 已提交
304 305 306
  display: flex;
  width: 100%;
  position: relative;
307 308
  padding-top: $gl-padding / 2;
  padding-bottom: $gl-padding / 2;
309
  align-items: center;
310
  border-bottom: 1px solid $border-color;
P
Phil Hughes 已提交
311 312 313
}

.breadcrumbs-links {
314
  -webkit-flex: 1;
P
Phil Hughes 已提交
315
  flex: 1;
316
  min-width: 0;
P
Phil Hughes 已提交
317
  align-self: center;
318
  color: $gl-text-color-secondary;
P
Phil Hughes 已提交
319 320

  .avatar-tile {
P
Phil Hughes 已提交
321
    margin-right: 4px;
P
Phil Hughes 已提交
322 323 324 325 326 327
    border: 1px solid $border-color;
    border-radius: 50%;
    vertical-align: sub;
  }

  .text-expander {
328 329
    margin-left: 0;
    margin-right: 2px;
P
Phil Hughes 已提交
330 331 332 333 334 335 336 337

    > i {
      position: relative;
      top: 1px;
    }
  }
}

P
Phil Hughes 已提交
338
.breadcrumbs-list {
339
  display: -webkit-flex;
P
Phil Hughes 已提交
340
  display: flex;
341
  flex-wrap: wrap;
P
Phil Hughes 已提交
342
  margin-bottom: 0;
P
Phil Hughes 已提交
343
  line-height: 16px;
P
Phil Hughes 已提交
344 345 346 347

  > li {
    display: flex;
    align-items: center;
348
    position: relative;
349
    padding: 2px 0;
350 351

    &:not(:last-child) {
352
      margin-right: 20px;
353
    }
P
Phil Hughes 已提交
354

355
    > a {
P
Phil Hughes 已提交
356
      font-size: 12px;
357 358
      color: currentColor;
    }
P
Phil Hughes 已提交
359 360 361
  }
}

P
Phil Hughes 已提交
362
.breadcrumb-item-text {
P
Phil Hughes 已提交
363
  @include str-truncated(128px);
364
  text-decoration: inherit;
P
Phil Hughes 已提交
365 366
}

367 368 369 370
.breadcrumbs-list-angle {
  position: absolute;
  right: -12px;
  top: 50%;
P
Phil Hughes 已提交
371
  color: $gl-text-color-tertiary;
372 373 374
  transform: translateY(-50%);
}

P
Phil Hughes 已提交
375
.breadcrumbs-extra {
376
  display: flex;
P
Phil Hughes 已提交
377 378 379 380 381
  flex: 0 0 auto;
  margin-left: auto;
}

.breadcrumbs-sub-title {
P
Phil Hughes 已提交
382
  margin: 0;
P
Phil Hughes 已提交
383
  font-size: 12px;
384
  font-weight: 600;
385
  line-height: 16px;
386 387 388 389

  a {
    color: $gl-text-color;
  }
P
Phil Hughes 已提交
390
}
P
Phil Hughes 已提交
391

A
Annabel Dunstone Gray 已提交
392 393 394 395 396 397 398 399
.btn-sign-in {
  margin-top: 3px;
  font-weight: $gl-font-weight-bold;

  &:hover {
    background-color: $white-light;
  }
}
A
Fixes  
Annabel Dunstone Gray 已提交
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491

.navbar-nav {
  li {
    .badge {
      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;
      box-shadow: 0 1px 0 rgba($gl-header-color, .2);

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

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

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

@media (max-width: $screen-xs-max) {
  header .container-fluid {
    font-size: 18px;

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

    .navbar-collapse {
      padding-left: 5px;

      .nav > li:not(.hidden-xs) {
        display: table-cell !important;
        width: 25%;

        a {
          margin-right: 8px;
        }
      }
    }
  }

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

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

.header-user {
  .dropdown-menu-nav {
    width: auto;
    min-width: 140px;
    margin-top: -5px;
    color: $gl-text-color;
    left: auto;

    .current-user {
      padding: 5px 18px;

      .user-name {
        display: block;
      }
    }
  }
}

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

.with-performance-bar header.navbar-gitlab {
  top: $performance-bar-height;
}