nav.scss 7.3 KB
Newer Older
A
Annabel Dunstone 已提交
1
@mixin fade($gradient-direction, $rgba, $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);
A
Annabel Dunstone 已提交
11 12 13 14
  background: -webkit-linear-gradient($gradient-direction, $rgba, $gradient-color 45%);
  background: -o-linear-gradient($gradient-direction, $rgba, $gradient-color 45%);
  background: -moz-linear-gradient($gradient-direction, $rgba, $gradient-color 45%);
  background: linear-gradient($gradient-direction, $rgba, $gradient-color 45%);
15

16 17 18
  &.scrolling {
    visibility: visible;
    opacity: 1;
19 20
    transition-duration: .3s;
  }
21 22 23

  .fa {
    position: relative;
24 25
    top: 5px;
    font-size: 18px;
26
  }
27 28
}

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

A
Annabel Dunstone 已提交
35 36 37 38 39
  &::-webkit-scrollbar {
    display: none;
  }
}

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

  li {
    display: inline-block;

    a {
      display: inline-block;
A
Annabel Dunstone 已提交
52
      padding: $gl-btn-padding;
53 54 55 56 57 58 59 60 61 62 63 64 65 66
      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 {
67 68
      border-bottom: 2px solid $link-underline-blue;
      color: $black;
69 70 71 72 73 74 75 76
    }

    .badge {
      font-weight: normal;
      background-color: #eee;
      color: #78a;
    }
  }
A
Annabel Dunstone 已提交
77 78

  &.sub-nav {
79
    text-align: center;
A
Annabel Dunstone 已提交
80 81 82 83
    background-color: $background-color;

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

    li {

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

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

.top-area {
103 104
  @include clearfix;

105
  border-bottom: 1px solid #eee;
106 107 108 109 110 111 112

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

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

120 121
  .nav-search {
    display: inline-block;
122
    width: 100%;
123 124 125
    padding: 11px 0;

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

131 132 133
  .nav-links {
    display: inline-block;
    width: 50%;
134
    margin-bottom: 0;
135
    border-bottom: none;
136

137 138 139 140 141
    &.wide {
      width: 100%;
      display: block;
    }

A
Annabel Dunstone 已提交
142 143 144 145
    li a {
      padding: 16px 10px 11px;
    }

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

  .nav-controls {
    width: 50%;
    display: inline-block;
    float: right;
    text-align: right;
    padding: 11px 0;
158
    margin-bottom: 0;
159 160

    > .dropdown {
161
      margin-right: $gl-padding-top;
162
      display: inline-block;
163 164 165 166

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

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

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

    > .btn-grouped {
      float: none;
181
    }
182

183 184
    > form {
      display: inline-block;
185
      margin-top: -1px;
186 187
    }

A
Alfredo Sumaran 已提交
188 189 190 191
    .icon-label {
      display: none;
    }

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

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

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

205 206 207 208 209 210 211
      &.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; }
      }
212 213
    }

214 215 216 217 218 219
    .project-filter-form {
      input {
        background-color: $background-color;
      }
    }

220 221
    @media (max-width: $screen-xs-max) {
      padding-bottom: 0;
222
      width: 100%;
223
      .btn, form, .dropdown, .dropdown-menu-toggle, .form-control {
224
        margin: 0 0 10px;
A
Alfredo Sumaran 已提交
225
        display: block;
226
        width: 100%;
A
Alfredo Sumaran 已提交
227 228 229 230 231
      }

      form {
        display: block;
        height: auto;
232
        margin-bottom: 14px;
233 234 235

        input {
          width: 100%;
A
Alfredo Sumaran 已提交
236
          margin: 0 0 10px;
237
        }
A
Alfredo Sumaran 已提交
238 239
      }

A
Alfredo Sumaran 已提交
240
      .input-short {
A
Alfredo Sumaran 已提交
241 242 243 244 245 246
        width: 100%;
      }

      .icon-label {
        display: inline-block;
      }
247 248 249 250 251 252

      // Applies on /dashboard/issues
      .project-item-select-holder {
        display: block;
        margin: 0;
      }
253
    }
254
  }
255 256 257 258 259 260

  &.adjust {
    .nav-text, .nav-controls {
      width: auto;
    }
  }
261
}
262 263

.layout-nav {
264
  position: fixed;
A
Annabel Dunstone 已提交
265
  top: $header-height;
266
  width: 100%;
P
Phil Hughes 已提交
267
  z-index: 11;
D
Dmitriy Zaporozhets 已提交
268
  background: $background-color;
269
  border-bottom: 1px solid $border-color;
270
  transition: padding $sidebar-transition-duration;
271
  text-align: center;
272

273 274 275 276
  .container-fluid {
    position: relative;
  }

277 278
  .controls {
    float: right;
279
    padding: 7px 0 0;
280

281
    @media (max-width: $screen-sm-max) {
282
      display: none;
A
Annabel Dunstone 已提交
283 284
    }

285 286 287 288 289 290 291 292 293 294 295 296 297
    i {
      color: $layout-link-gray;
    }

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

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

    .dropdown {
P
Phil Hughes 已提交
300 301 302
      position: absolute;
      top: 7px;
      right: 15px;
303
      z-index: 2;
304 305 306 307

      li.active {
        font-weight: bold;
      }
308
    }
309 310
  }

311 312
  .nav-links {
    border-bottom: none;
313
    height: 51px;
314

315 316
    li {

317 318 319 320 321 322 323 324 325
      a {
        padding-top: 10px;
      }

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

      &.active {
326

327 328 329
        a, i {
          color: $black;
        }
330 331 332 333 334 335 336

        svg {
          path,
          polygon {
            fill: $black;
          }
        }
337 338
      }

339 340 341
      .badge {
        color: $gl-icon-color;
      }
342 343 344 345 346 347

      &:hover {
        a, i {
          color: $black;
        }
      }
348
    }
349
  }
350 351
}

352 353 354 355 356
.scrolling-tabs-container {
  position: relative;

  .nav-links {
    @include scrolling-links();
357
  }
358

359 360 361 362 363 364
  .fade-right {
    @include fade(left, rgba(255, 255, 255, 0.4), $background-color);
    right: -5px;

    .fa {
      right: -7px;
365
    }
366
  }
367

368 369 370 371 372 373
  .fade-left {
    @include fade(right, rgba(255, 255, 255, 0.4), $background-color);
    left: -5px;

    .fa {
      left: -7px;
374 375
    }
  }
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394

  &.sub-nav-scroll {

    .fade-right {
      right: 0;

      .fa {
        right: -23px;
      }
    }

    .fade-left {
      left: 0;

      .fa {
        left: 10px;
      }
    }
  }
395 396
}

A
Annabel Dunstone 已提交
397 398 399 400 401 402 403 404
.nav-block {
  position: relative;

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

    .fade-right {
      @include fade(left, rgba(255, 255, 255, 0.4), $white-light);
405 406 407 408 409
      right: -5px;

      .fa {
        right: -7px;
      }
A
Annabel Dunstone 已提交
410 411 412 413
    }

    .fade-left {
      @include fade(right, rgba(255, 255, 255, 0.4), $white-light);
414 415 416 417 418
      left: -5px;

      .fa {
        left: -7px;
      }
A
Annabel Dunstone 已提交
419 420 421 422
    }
  }
}

423
.page-with-layout-nav {
424
  margin-top: $header-height + 2;
A
Annabel Dunstone 已提交
425

A
Annabel Dunstone 已提交
426
  .right-sidebar {
427
    top: ($header-height * 2) + 2;
A
Annabel Dunstone 已提交
428
  }
429
}
430 431 432 433 434 435 436 437 438 439 440

.activities {

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

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