nav.scss 5.8 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
@mixin fade($gradient-direction) {
  visibility: visible;
  opacity: 1;
  position: absolute;
  bottom: 16px;
  width: 43px;
  height: 30px;
  transition-duration: .3s;
  -webkit-transform: translateZ(0);
  background: -webkit-linear-gradient($gradient-direction, rgba(250, 250, 250, 0.4), $background-color 45%);
  background: -o-linear-gradient($gradient-direction, rgba(250, 250, 250, 0.4), $background-color 45%);
  background: -moz-linear-gradient($gradient-direction, rgba(250, 250, 250, 0.4), $background-color 45%);
  background: linear-gradient($gradient-direction, rgba(250, 250, 250, 0.4), $background-color 45%);

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

22 23 24 25
.nav-links {
  padding: 0;
  margin: 0;
  list-style: none;
26
  height: auto;
27 28 29 30 31 32 33
  border-bottom: 1px solid $border-color;

  li {
    display: inline-block;

    a {
      display: inline-block;
34
      padding: 14px;
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
      padding-top: $gl-padding;
      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 {
50 51
      border-bottom: 2px solid $link-underline-blue;
      color: $black;
52 53 54 55 56 57 58 59 60
    }

    .badge {
      font-weight: normal;
      background-color: #eee;
      color: #78a;
    }
  }
}
61 62

.top-area {
63 64
  @include clearfix;

65
  border-bottom: 1px solid #eee;
66 67 68 69 70 71 72

  .nav-text {
    padding-top: 16px;
    padding-bottom: 11px;
    display: inline-block;
    width: 50%;
    line-height: 28px;
73 74 75 76 77

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

80 81
  .nav-search {
    display: inline-block;
82
    width: 100%;
83 84 85
    padding: 11px 0;

    /* Small devices (phones, tablets, 768px and lower) */
86 87
    @media (min-width: $screen-sm-min) {
      width: 50%;
88 89 90
    }
  }

91 92 93
  .nav-links {
    display: inline-block;
    width: 50%;
94
    margin-bottom: 0;
95
    border-bottom: none;
96 97

    /* Small devices (phones, tablets, 768px and lower) */
98
    @media (max-width: $screen-sm-max) {
99 100
      width: 100%;
    }
101 102 103 104 105 106 107 108
  }

  .nav-controls {
    width: 50%;
    display: inline-block;
    float: right;
    text-align: right;
    padding: 11px 0;
109
    margin-bottom: 0;
110 111

    > .dropdown {
112
      margin-right: $gl-padding-top;
113
      display: inline-block;
114 115 116 117

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

120
    > .btn {
121
      margin-right: $gl-padding-top;
122
      display: inline-block;
123 124 125 126 127 128 129 130

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

    > .btn-grouped {
      float: none;
131
    }
132

133 134
    > form {
      display: inline-block;
135
      margin-top: -1px;
136 137
    }

A
Alfredo Sumaran 已提交
138 139 140 141
    .icon-label {
      display: none;
    }

142
    input {
P
Phil Hughes 已提交
143
      height: 35px;
144
      display: inline-block;
145
      position: relative;
146
      top: 2px;
147
      margin-right: $gl-padding-top;
148 149 150 151 152

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

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

155 156 157 158 159 160 161
      &.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; }
      }
162 163
    }

164 165 166 167 168 169
    .project-filter-form {
      input {
        background-color: $background-color;
      }
    }

170 171 172 173
    @media (max-width: $screen-xs-max) {
      padding-bottom: 0;

      .btn, form, .dropdown, .dropdown-menu-toggle, .form-control {
174
        margin: 0 0 10px;
A
Alfredo Sumaran 已提交
175
        display: block;
176
        width: 100%;
A
Alfredo Sumaran 已提交
177 178 179 180 181
      }

      form {
        display: block;
        height: auto;
182 183 184

        input {
          width: 100%;
A
Alfredo Sumaran 已提交
185
          margin: 0 0 10px;
186
        }
A
Alfredo Sumaran 已提交
187 188
      }

A
Alfredo Sumaran 已提交
189
      .input-short {
A
Alfredo Sumaran 已提交
190 191 192 193 194 195
        width: 100%;
      }

      .icon-label {
        display: inline-block;
      }
196 197 198 199 200 201

      // Applies on /dashboard/issues
      .project-item-select-holder {
        display: block;
        margin: 0;
      }
202 203 204 205 206 207 208 209 210 211
    }

    /* Small devices (tablets, 768px and lower) */
    @media (max-width: $screen-sm-max) {
      width: 100%;
      text-align: left;

      input {
        width: 300px;
      }
212 213 214
    }
  }
}
215 216

.layout-nav {
217
  position: fixed;
A
Annabel Dunstone 已提交
218
  top: $header-height;
219
  width: 100%;
P
Phil Hughes 已提交
220
  z-index: 11;
D
Dmitriy Zaporozhets 已提交
221
  background: $background-color;
222
  border-bottom: 1px solid $border-color;
223
  transition-duration: .3s;
224

225 226 227 228
  .container-fluid {
    position: relative;
  }

229 230
  .controls {
    float: right;
231
    padding: 7px 0 0;
232

A
Annabel Dunstone 已提交
233
    @media (max-width: $screen-xs-min) {
234
      display: none;
A
Annabel Dunstone 已提交
235 236
    }

237 238 239 240 241 242 243 244 245 246 247 248 249
    i {
      color: $layout-link-gray;
    }

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

    .fa-caret-down {
      margin-left: 5px;
      color: $gl-icon-color;
    }
250 251 252

    .dropdown {
      margin-left: 7px;
A
Annabel Dunstone 已提交
253 254 255 256

      @media (max-width: $screen-xs-min) {
        margin-left: 0;
      }
257 258 259 260

      li.active {
        font-weight: bold;
      }
261
    }
262 263
  }

264 265
  .nav-links {
    border-bottom: none;
266 267 268
    height: 51px;
    white-space: nowrap;
    overflow-x: auto;
A
Annabel Dunstone 已提交
269 270 271 272 273
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    &::-webkit-scrollbar {
      display: none;
    }
274

275 276
    .fade-right {
      @include fade(left);
A
Annabel Dunstone 已提交
277 278 279 280 281 282 283 284
      right: 58px;

      @media (min-width: $screen-xs-max) {
        right: 67px;
      }
      @media (max-width: $screen-xs-min) {
        right: 0;
      }
A
Annabel Dunstone 已提交
285 286
    }

287 288 289
    .fade-left {
      @include fade(right);
      left: 0;
A
Annabel Dunstone 已提交
290 291
    }

292 293
    li {

294 295 296 297 298 299 300 301 302 303 304 305 306 307
      a {
        padding-top: 10px;
      }

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

      &.active {
        a, i {
          color: $black;
        }
      }

308 309 310 311
      .badge {
        color: $gl-icon-color;
      }
    }
312
  }
313 314 315
}

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

A
Annabel Dunstone 已提交
318
  .right-sidebar {
319
    top: ($header-height * 2) + 2;
A
Annabel Dunstone 已提交
320
  }
321
}