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
      padding-bottom: 11px;
      margin-bottom: -1px;
      font-size: 15px;
      line-height: 28px;
T
tauriedavis 已提交
54
      color: $note-toolbar-color;
55 56
      border-bottom: 2px solid transparent;

57 58 59
      &:hover,
      &:active,
      &:focus {
60
        text-decoration: none;
T
tauriedavis 已提交
61 62 63 64 65 66
        border-bottom: 2px solid $gray-darkest;
        color: $black;

        .badge {
          color: $black;
        }
67 68 69 70
      }
    }

    &.active a {
71 72
      border-bottom: 2px solid $link-underline-blue;
      color: $black;
T
tauriedavis 已提交
73
      font-weight: 600;
74 75 76 77 78
    }

    .badge {
      font-weight: normal;
      background-color: #eee;
79
      color: $btn-transparent-color;
C
Clement Ho 已提交
80
      vertical-align: baseline;
81 82
    }
  }
A
Annabel Dunstone 已提交
83 84

  &.sub-nav {
85
    text-align: center;
86
    background-color: $dark-background-color;
A
Annabel Dunstone 已提交
87 88

    .container-fluid {
89
      background-color: $dark-background-color;
A
Annabel Dunstone 已提交
90
      margin-bottom: 0;
A
Annabel Dunstone 已提交
91 92 93 94
    }

    li {

T
tauriedavis 已提交
95 96 97 98
      &.active a {
        border-bottom: none;
      }

A
Annabel Dunstone 已提交
99 100 101 102
      a {
        margin: 0;
        padding: 11px 10px 9px;

T
tauriedavis 已提交
103 104 105 106 107 108
        &:hover,
        &:active,
        &:focus {
          color: $black;
          border-bottom: none;
        }
A
Annabel Dunstone 已提交
109 110 111
      }
    }
  }
112
}
113 114

.top-area {
115
  @include clearfix;
116
  border-bottom: 1px solid $btn-gray-hover;
117 118 119 120 121 122 123

  .nav-text {
    padding-top: 16px;
    padding-bottom: 11px;
    display: inline-block;
    width: 50%;
    line-height: 28px;
124 125 126 127 128

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

131 132
  .nav-search {
    display: inline-block;
133
    width: 100%;
134 135 136
    padding: 11px 0;

    /* Small devices (phones, tablets, 768px and lower) */
137 138
    @media (min-width: $screen-sm-min) {
      width: 50%;
139 140 141
    }
  }

142 143 144
  .nav-links {
    display: inline-block;
    width: 50%;
145
    margin-bottom: 0;
146
    border-bottom: none;
147

148 149 150 151 152
    &.wide {
      width: 100%;
      display: block;
    }

A
Annabel Dunstone 已提交
153
    li a {
154
      padding: 16px 15px 11px;
A
Annabel Dunstone 已提交
155 156
    }

157
    /* Small devices (phones, tablets, 768px and lower) */
158
    @media (max-width: $screen-xs-max) {
159 160
      width: 100%;
    }
161 162 163 164 165 166 167 168
  }

  .nav-controls {
    width: 50%;
    display: inline-block;
    float: right;
    text-align: right;
    padding: 11px 0;
169
    margin-bottom: 0;
170 171

    > .dropdown {
172
      margin-right: $gl-padding-top;
173
      display: inline-block;
174
      vertical-align: top;
175 176 177 178

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

181
    > .btn {
182
      margin-right: $gl-padding-top;
183
      display: inline-block;
184
      vertical-align: top;
185 186 187 188 189 190 191 192

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

    > .btn-grouped {
      float: none;
193
    }
194

195 196 197 198
    > form {
      display: inline-block;
    }

A
Alfredo Sumaran 已提交
199 200 201 202
    .icon-label {
      display: none;
    }

203
    input {
P
Phil Hughes 已提交
204
      height: 35px;
205
      display: inline-block;
206
      position: relative;
207
      margin-right: $gl-padding-top;
208 209 210 211 212

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

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

215 216 217 218 219 220 221
      &.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; }
      }
222 223
    }

224 225
    @media (max-width: $screen-xs-max) {
      padding-bottom: 0;
226
      width: 100%;
227

228 229 230 231 232
      .btn,
      form,
      .dropdown,
      .dropdown-menu-toggle,
      .form-control {
233
        margin: 0 0 10px;
A
Alfredo Sumaran 已提交
234
        display: block;
235
        width: 100%;
A
Alfredo Sumaran 已提交
236 237 238 239 240
      }

      form {
        display: block;
        height: auto;
241
        margin-bottom: 14px;
242 243 244

        input {
          width: 100%;
A
Alfredo Sumaran 已提交
245
          margin: 0 0 10px;
246
        }
A
Alfredo Sumaran 已提交
247 248
      }

A
Alfredo Sumaran 已提交
249
      .input-short {
A
Alfredo Sumaran 已提交
250 251 252 253 254 255
        width: 100%;
      }

      .icon-label {
        display: inline-block;
      }
256 257 258 259 260 261

      // Applies on /dashboard/issues
      .project-item-select-holder {
        display: block;
        margin: 0;
      }
262
    }
263
  }
264 265

  &.adjust {
266 267
    .nav-text,
    .nav-controls {
268 269 270
      width: auto;
    }
  }
271
}
272 273

.layout-nav {
274
  position: fixed;
A
Annabel Dunstone 已提交
275
  top: $header-height;
276
  width: 100%;
P
Phil Hughes 已提交
277
  z-index: 11;
D
Dmitriy Zaporozhets 已提交
278
  background: $background-color;
279
  border-bottom: 1px solid $border-color;
280
  transition: padding $sidebar-transition-duration;
281
  text-align: center;
282

283 284 285 286
  .container-fluid {
    position: relative;
  }

287 288
  .controls {
    float: right;
289
    padding: 7px 0 0;
290

291
    @media (max-width: $screen-sm-max) {
292
      display: none;
A
Annabel Dunstone 已提交
293 294
    }

295 296 297 298 299 300 301 302 303 304 305 306 307
    i {
      color: $layout-link-gray;
    }

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

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

    .dropdown {
P
Phil Hughes 已提交
310 311 312
      position: absolute;
      top: 7px;
      right: 15px;
313
      z-index: 2;
314 315 316 317

      li.active {
        font-weight: bold;
      }
318
    }
319 320
  }

321 322
  .nav-links {
    border-bottom: none;
323
    height: 51px;
324

325
    li {
326 327 328
      a {
        padding-top: 10px;
      }
329
    }
330
  }
331 332
}

333 334 335 336 337
.scrolling-tabs-container {
  position: relative;

  .nav-links {
    @include scrolling-links();
338
  }
339

340
  .fade-right {
341
    @include fade(left, $background-color);
342 343 344 345
    right: -5px;

    .fa {
      right: -7px;
346
    }
347
  }
348

349
  .fade-left {
350
    @include fade(right, $background-color);
351 352 353 354
    left: -5px;

    .fa {
      left: -7px;
355 356
    }
  }
357 358 359 360

  &.sub-nav-scroll {

    .fade-right {
361
      @include fade(left, $dark-background-color);
362 363 364 365 366 367 368 369
      right: 0;

      .fa {
        right: -23px;
      }
    }

    .fade-left {
370
      @include fade(right, $dark-background-color);
371 372 373 374 375 376 377
      left: 0;

      .fa {
        left: 10px;
      }
    }
  }
378 379
}

A
Annabel Dunstone 已提交
380 381 382 383 384 385 386
.nav-block {
  position: relative;

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

    .fade-right {
387
      @include fade(left, $white-light);
388 389 390 391 392
      right: -5px;

      .fa {
        right: -7px;
      }
A
Annabel Dunstone 已提交
393 394 395
    }

    .fade-left {
396
      @include fade(right, $white-light);
397 398 399 400 401
      left: -5px;

      .fa {
        left: -7px;
      }
A
Annabel Dunstone 已提交
402 403 404 405
    }
  }
}

406
.page-with-layout-nav {
407
  margin-top: $header-height + 2;
A
Annabel Dunstone 已提交
408

A
Annabel Dunstone 已提交
409
  .right-sidebar {
410
    top: ($header-height * 2) + 2;
A
Annabel Dunstone 已提交
411
  }
412
}
413 414 415 416 417 418 419 420 421 422 423

.activities {

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

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