nav.scss 7.4 KB
Newer Older
A
Annabel Dunstone 已提交
1
@mixin fade($gradient-direction, $rgba, $gradient-color) {
2 3
  visibility: visible;
  opacity: 1;
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 19 20 21 22

  &.end-scroll {
    visibility: hidden;
    opacity: 0;
    transition-duration: .3s;
  }
}

A
Annabel Dunstone 已提交
23 24 25 26 27 28 29 30 31 32
@mixin scrolling-links() {
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  &::-webkit-scrollbar {
    display: none;
  }
}

33 34 35 36
.nav-links {
  padding: 0;
  margin: 0;
  list-style: none;
37
  height: auto;
38 39 40 41 42 43 44
  border-bottom: 1px solid $border-color;

  li {
    display: inline-block;

    a {
      display: inline-block;
A
Annabel Dunstone 已提交
45
      padding: $gl-btn-padding;
46 47 48 49 50 51 52 53 54 55 56 57 58 59
      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 {
60 61
      border-bottom: 2px solid $link-underline-blue;
      color: $black;
62 63 64 65 66 67 68 69
    }

    .badge {
      font-weight: normal;
      background-color: #eee;
      color: #78a;
    }
  }
A
Annabel Dunstone 已提交
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90

  &.sub-nav {
    background-color: $background-color;

    .container-fluid {
      background-color: $background-color;
    }

    li {

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

      &.active a {
        border-bottom: none;
        color: $link-underline-blue;
      }
    }
  }
91
}
92 93

.top-area {
94 95
  @include clearfix;

96
  border-bottom: 1px solid #eee;
97 98 99 100 101 102 103

  .nav-text {
    padding-top: 16px;
    padding-bottom: 11px;
    display: inline-block;
    width: 50%;
    line-height: 28px;
104

105 106 107 108
    &.wiki-page {
      padding: 16px 10px 11px;
    }

109 110 111 112
    /* Small devices (phones, tablets, 768px and lower) */
    @media (max-width: $screen-sm-min) {
      width: 100%;
    }
113 114
  }

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

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

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

A
Annabel Dunstone 已提交
132 133 134 135
    li a {
      padding: 16px 10px 11px;
    }

136
    /* Small devices (phones, tablets, 768px and lower) */
137
    @media (max-width: $screen-sm-max) {
138 139
      width: 100%;
    }
140 141 142 143 144 145 146 147
  }

  .nav-controls {
    width: 50%;
    display: inline-block;
    float: right;
    text-align: right;
    padding: 11px 0;
148
    margin-bottom: 0;
149 150

    > .dropdown {
151
      margin-right: $gl-padding-top;
152
      display: inline-block;
153 154 155 156

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

159
    > .btn {
160
      margin-right: $gl-padding-top;
161
      display: inline-block;
162 163 164 165 166 167 168 169

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

    > .btn-grouped {
      float: none;
170
    }
171

172 173
    > form {
      display: inline-block;
174
      margin-top: -1px;
175
      margin-bottom: 12px;
176 177
    }

A
Alfredo Sumaran 已提交
178 179 180 181
    .icon-label {
      display: none;
    }

182
    input {
P
Phil Hughes 已提交
183
      height: 35px;
184
      display: inline-block;
185
      position: relative;
186
      top: 2px;
187
      margin-right: $gl-padding-top;
188 189 190 191 192

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

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

195 196 197 198 199 200 201
      &.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; }
      }
202 203
    }

204 205 206 207 208 209
    .project-filter-form {
      input {
        background-color: $background-color;
      }
    }

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 223 224

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

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

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

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

.layout-nav {
247
  position: fixed;
A
Annabel Dunstone 已提交
248
  top: $header-height;
249
  width: 100%;
P
Phil Hughes 已提交
250
  z-index: 11;
D
Dmitriy Zaporozhets 已提交
251
  background: $background-color;
252
  border-bottom: 1px solid $border-color;
253
  transition-duration: .3s;
254

255 256 257 258
  .container-fluid {
    position: relative;
  }

259 260
  .controls {
    float: right;
261
    padding: 7px 0 0;
262

263
    @media (max-width: $screen-xs-max) {
264
      display: none;
A
Annabel Dunstone 已提交
265 266
    }

267 268 269 270 271 272 273 274 275 276 277 278 279
    i {
      color: $layout-link-gray;
    }

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

    .fa-caret-down {
      margin-left: 5px;
      color: $gl-icon-color;
    }
280 281 282

    .dropdown {
      margin-left: 7px;
A
Annabel Dunstone 已提交
283 284 285 286

      @media (max-width: $screen-xs-min) {
        margin-left: 0;
      }
287 288 289 290

      li.active {
        font-weight: bold;
      }
291
    }
292 293
  }

294
  .nav-links {
A
Annabel Dunstone 已提交
295
    @include scrolling-links();
296
    border-bottom: none;
297
    height: 51px;
298

299 300 301 302 303 304 305 306 307 308 309 310 311
    svg {
      position: relative;
      top: 2px;
      margin-right: 2px;
      height: 15px;
      width: auto;

      path,
      polygon {
        fill: $layout-link-gray;
      }
    }

312
    .fade-right {
A
Annabel Dunstone 已提交
313
      @include fade(left, rgba(250, 250, 250, 0.4), $background-color);
314
      right: 0;
A
Annabel Dunstone 已提交
315 316
    }

317
    .fade-left {
A
Annabel Dunstone 已提交
318
      @include fade(right, rgba(250, 250, 250, 0.4), $background-color);
319
      left: 0;
A
Annabel Dunstone 已提交
320 321
    }

322 323
    li {

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

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

      &.active {
333

334 335 336
        a, i {
          color: $black;
        }
337 338 339 340 341 342 343

        svg {
          path,
          polygon {
            fill: $black;
          }
        }
344 345
      }

346 347 348 349
      .badge {
        color: $gl-icon-color;
      }
    }
350
  }
351 352 353

  .nav-control {

A
Annabel Dunstone 已提交
354
    .fade-right {
355 356 357 358 359 360 361 362
      @media (min-width: $screen-xs-max) {
        right: 67px;
      }
      @media (max-width: $screen-xs-min) {
        right: 0;
      }
    }
  }
363 364
}

365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382
.scrolling-tabs-container {
  position: relative;

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

    .fade-right {
      @include fade(left, rgba(255, 255, 255, 0.4), $background-color);
      right: 0;
    }

    .fade-left {
      @include fade(right, rgba(255, 255, 255, 0.4), $background-color);
      left: 0;
    }
  }
}

A
Annabel Dunstone 已提交
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397
.nav-block {
  position: relative;

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

    .fade-right {
      @include fade(left, rgba(255, 255, 255, 0.4), $white-light);
      right: 0;
    }

    .fade-left {
      @include fade(right, rgba(255, 255, 255, 0.4), $white-light);
      left: 0;
    }
398 399 400 401 402 403 404 405 406 407

    &.event-filter {
      .fade-right {
        visibility: hidden;

        @media (max-width: $screen-xs-max) {
          visibility: visible;
        }
      }
    }
A
Annabel Dunstone 已提交
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;
    }
  }
}