nav.scss 6.9 KB
Newer Older
1
@mixin fade($gradient-direction, $gradient-color) {
2 3
  visibility: hidden;
  opacity: 0;
4
  z-index: 2;
5
  position: absolute;
6
  bottom: 12px;
7 8 9 10
  width: 43px;
  height: 30px;
  transition-duration: .3s;
  -webkit-transform: translateZ(0);
11
  background: linear-gradient(to $gradient-direction, $gradient-color 45%, rgba($gradient-color, 0.4));
12

13 14 15
  &.scrolling {
    visibility: visible;
    opacity: 1;
16 17
    transition-duration: .3s;
  }
18 19 20

  .fa {
    position: relative;
21 22
    top: 5px;
    font-size: 18px;
23
  }
24 25
}

A
Annabel Dunstone 已提交
26 27 28 29 30
@mixin scrolling-links() {
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
31

A
Annabel Dunstone 已提交
32 33 34 35 36
  &::-webkit-scrollbar {
    display: none;
  }
}

37 38 39 40
.nav-links {
  padding: 0;
  margin: 0;
  list-style: none;
41
  height: auto;
42 43 44 45 46 47 48
  border-bottom: 1px solid $border-color;

  li {
    display: inline-block;

    a {
      display: inline-block;
A
Annabel Dunstone 已提交
49
      padding: $gl-btn-padding;
50 51 52 53 54 55 56 57 58 59 60 61 62 63
      padding-bottom: 11px;
      margin-bottom: -1px;
      font-size: 15px;
      line-height: 28px;
      color: #959494;
      border-bottom: 2px solid transparent;

      &:hover, &:active, &:focus {
        text-decoration: none;
        outline: none;
      }
    }

    &.active a {
64 65
      border-bottom: 2px solid $link-underline-blue;
      color: $black;
66 67 68 69 70
    }

    .badge {
      font-weight: normal;
      background-color: #eee;
71
      color: $btn-transparent-color;
C
Clement Ho 已提交
72
      vertical-align: baseline;
73 74
    }
  }
A
Annabel Dunstone 已提交
75 76

  &.sub-nav {
77
    text-align: center;
78
    background-color: $dark-background-color;
A
Annabel Dunstone 已提交
79 80

    .container-fluid {
81
      background-color: $dark-background-color;
A
Annabel Dunstone 已提交
82
      margin-bottom: 0;
A
Annabel Dunstone 已提交
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
    }

    li {

      a {
        margin: 0;
        padding: 11px 10px 9px;
      }

      &.active a {
        border-bottom: none;
        color: $link-underline-blue;
      }
    }
  }
98
}
99 100

.top-area {
101
  @include clearfix;
102
  border-bottom: 1px solid $btn-gray-hover;
103 104 105 106 107 108 109

  .nav-text {
    padding-top: 16px;
    padding-bottom: 11px;
    display: inline-block;
    width: 50%;
    line-height: 28px;
110 111 112 113 114

    /* Small devices (phones, tablets, 768px and lower) */
    @media (max-width: $screen-sm-min) {
      width: 100%;
    }
115 116
  }

117 118
  .nav-search {
    display: inline-block;
119
    width: 100%;
120 121 122
    padding: 11px 0;

    /* Small devices (phones, tablets, 768px and lower) */
123 124
    @media (min-width: $screen-sm-min) {
      width: 50%;
125 126 127
    }
  }

128 129 130
  .nav-links {
    display: inline-block;
    width: 50%;
131
    margin-bottom: 0;
132
    border-bottom: none;
133

134 135 136 137 138
    &.wide {
      width: 100%;
      display: block;
    }

A
Annabel Dunstone 已提交
139
    li a {
140
      padding: 16px 15px 11px;
A
Annabel Dunstone 已提交
141 142
    }

143
    /* Small devices (phones, tablets, 768px and lower) */
144
    @media (max-width: $screen-xs-max) {
145 146
      width: 100%;
    }
147 148 149 150 151 152 153 154
  }

  .nav-controls {
    width: 50%;
    display: inline-block;
    float: right;
    text-align: right;
    padding: 11px 0;
155
    margin-bottom: 0;
156 157

    > .dropdown {
158
      margin-right: $gl-padding-top;
159
      display: inline-block;
160
      vertical-align: top;
161 162 163 164

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

167
    > .btn {
168
      margin-right: $gl-padding-top;
169
      display: inline-block;
170
      vertical-align: top;
171 172 173 174 175 176 177 178

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

    > .btn-grouped {
      float: none;
179
    }
180

181 182 183 184
    > form {
      display: inline-block;
    }

A
Alfredo Sumaran 已提交
185 186 187 188
    .icon-label {
      display: none;
    }

189
    input {
P
Phil Hughes 已提交
190
      height: 35px;
191
      display: inline-block;
192
      position: relative;
193
      margin-right: $gl-padding-top;
194 195 196 197 198

      /* Medium devices (desktops, 992px and up) */
      @media (min-width: $screen-md-min) { width: 200px; }

      /* Large devices (large desktops, 1200px and up) */
199
      @media (min-width: $screen-lg-min) { width: 250px; }
200

201 202 203 204 205 206 207
      &.input-short {
        /* Medium devices (desktops, 992px and up) */
        @media (min-width: $screen-md-min) { width: 170px; }

        /* Large devices (large desktops, 1200px and up) */
        @media (min-width: $screen-lg-min) { width: 210px; }
      }
208 209
    }

210 211
    @media (max-width: $screen-xs-max) {
      padding-bottom: 0;
212
      width: 100%;
213
      .btn, form, .dropdown, .dropdown-menu-toggle, .form-control {
214
        margin: 0 0 10px;
A
Alfredo Sumaran 已提交
215
        display: block;
216
        width: 100%;
A
Alfredo Sumaran 已提交
217 218 219 220 221
      }

      form {
        display: block;
        height: auto;
222
        margin-bottom: 14px;
223 224 225

        input {
          width: 100%;
A
Alfredo Sumaran 已提交
226
          margin: 0 0 10px;
227
        }
A
Alfredo Sumaran 已提交
228 229
      }

A
Alfredo Sumaran 已提交
230
      .input-short {
A
Alfredo Sumaran 已提交
231 232 233 234 235 236
        width: 100%;
      }

      .icon-label {
        display: inline-block;
      }
237 238 239 240 241 242

      // Applies on /dashboard/issues
      .project-item-select-holder {
        display: block;
        margin: 0;
      }
243
    }
244
  }
245 246 247 248 249 250

  &.adjust {
    .nav-text, .nav-controls {
      width: auto;
    }
  }
251
}
252 253

.layout-nav {
254
  position: fixed;
A
Annabel Dunstone 已提交
255
  top: $header-height;
256
  width: 100%;
P
Phil Hughes 已提交
257
  z-index: 11;
D
Dmitriy Zaporozhets 已提交
258
  background: $background-color;
259
  border-bottom: 1px solid $border-color;
260
  transition: padding $sidebar-transition-duration;
261
  text-align: center;
262

263 264 265 266
  .container-fluid {
    position: relative;
  }

267 268
  .controls {
    float: right;
269
    padding: 7px 0 0;
270

271
    @media (max-width: $screen-sm-max) {
272
      display: none;
A
Annabel Dunstone 已提交
273 274
    }

275 276 277 278 279 280 281 282 283 284 285 286 287
    i {
      color: $layout-link-gray;
    }

    .fa-rss,
    .fa-cog {
      font-size: 16px;
    }

    .fa-caret-down {
      margin-left: 5px;
      color: $gl-icon-color;
    }
288 289

    .dropdown {
P
Phil Hughes 已提交
290 291 292
      position: absolute;
      top: 7px;
      right: 15px;
293
      z-index: 2;
294 295 296 297

      li.active {
        font-weight: bold;
      }
298
    }
299 300
  }

301 302
  .nav-links {
    border-bottom: none;
303
    height: 51px;
304

305 306
    li {

307 308 309 310 311 312 313 314 315
      a {
        padding-top: 10px;
      }

      a, i {
        color: $layout-link-gray;
      }

      &.active {
316

317 318 319
        a, i {
          color: $black;
        }
320 321 322 323 324 325 326

        svg {
          path,
          polygon {
            fill: $black;
          }
        }
327 328
      }

329 330 331 332 333
      &:hover {
        a, i {
          color: $black;
        }
      }
334
    }
335
  }
336 337
}

338 339 340 341 342
.scrolling-tabs-container {
  position: relative;

  .nav-links {
    @include scrolling-links();
343
  }
344

345
  .fade-right {
346
    @include fade(left, $background-color);
347 348 349 350
    right: -5px;

    .fa {
      right: -7px;
351
    }
352
  }
353

354
  .fade-left {
355
    @include fade(right, $background-color);
356 357 358 359
    left: -5px;

    .fa {
      left: -7px;
360 361
    }
  }
362 363 364 365

  &.sub-nav-scroll {

    .fade-right {
366
      @include fade(left, $dark-background-color);
367 368 369 370 371 372 373 374
      right: 0;

      .fa {
        right: -23px;
      }
    }

    .fade-left {
375
      @include fade(right, $dark-background-color);
376 377 378 379 380 381 382
      left: 0;

      .fa {
        left: 10px;
      }
    }
  }
383 384
}

A
Annabel Dunstone 已提交
385 386 387 388 389 390 391
.nav-block {
  position: relative;

  .nav-links {
    @include scrolling-links();

    .fade-right {
392
      @include fade(left, $white-light);
393 394 395 396 397
      right: -5px;

      .fa {
        right: -7px;
      }
A
Annabel Dunstone 已提交
398 399 400
    }

    .fade-left {
401
      @include fade(right, $white-light);
402 403 404 405 406
      left: -5px;

      .fa {
        left: -7px;
      }
A
Annabel Dunstone 已提交
407 408 409 410
    }
  }
}

411
.page-with-layout-nav {
412
  margin-top: $header-height + 2;
A
Annabel Dunstone 已提交
413

A
Annabel Dunstone 已提交
414
  .right-sidebar {
415
    top: ($header-height * 2) + 2;
A
Annabel Dunstone 已提交
416
  }
417
}
418 419 420 421 422 423 424 425 426 427 428

.activities {

  .nav-block {
    border-bottom: 1px solid $border-color;

    .nav-links {
      border-bottom: none;
    }
  }
}