BigW Consortium Gitlab

dropdowns.scss 8.63 KB
Newer Older
Phil Hughes committed
1 2 3 4 5 6
.caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 2px;
  vertical-align: middle;
7
  border-top: $caret-width-base dashed;
Phil Hughes committed
8 9 10 11
  border-right: $caret-width-base solid transparent;
  border-left: $caret-width-base solid transparent;
}

12 13 14 15 16 17
.btn-group {
  .caret {
    margin-left: 0;
  }
}

Phil Hughes committed
18 19
.dropdown {
  position: relative;
20
}
Phil Hughes committed
21

22 23 24
.open {
  .dropdown-menu {
    display: block;
Phil Hughes committed
25
  }
26 27 28 29 30 31 32 33 34 35 36 37

  .dropdown-menu-toggle {
    border-color: $dropdown-toggle-hover-border-color;

    .fa {
      color: $dropdown-toggle-hover-icon-color;
    }
  }
}

.dropdown-menu-toggle {
  position: relative;
38
  width: 160px;
Phil Hughes committed
39
  padding: 6px 20px 6px 10px;
40 41 42 43 44
  background-color: $dropdown-toggle-bg;
  color: $dropdown-toggle-color;
  font-size: 15px;
  text-align: left;
  border: 1px solid $dropdown-toggle-border-color;
Phil Hughes committed
45
  border-radius: $border-radius-base;
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
  outline: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;

  .fa {
    position: absolute;
    top: 50%;
    right: 6px;
    margin-top: -4px;
    color: $dropdown-toggle-icon-color;
    font-size: 10px;
  }

  &:hover, {
    border-color: $dropdown-toggle-hover-border-color;

    .fa {
      color: $dropdown-toggle-hover-icon-color;
    }
  }
Phil Hughes committed
67 68 69 70 71 72 73
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
74
  z-index: 9;
Phil Hughes committed
75 76
  width: 240px;
  margin-top: 2px;
77
  margin-bottom: 0;
78
  font-size: 15px;
79
  font-weight: normal;
80
  padding: 10px 0;
Phil Hughes committed
81 82
  background-color: $dropdown-bg;
  border: 1px solid $dropdown-border-color;
Phil Hughes committed
83
  border-radius: $border-radius-base;
Phil Hughes committed
84 85
  box-shadow: 0 2px 4px $dropdown-shadow-color;

86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
  &.is-loading {
    .dropdown-content {
      display: none;
    }

    .dropdown-loading {
      display: block;
    }
  }

  ul {
    margin: 0;
    padding: 0;
  }

Phil Hughes committed
101 102 103
  li {
    text-align: left;
    list-style: none;
104
    padding: 0 10px;
Phil Hughes committed
105 106 107
  }

  .divider {
108 109 110 111 112 113 114
    height: 1px;
    margin: 8px 10px;
    padding: 0;
    background-color: $dropdown-divider-color;
  }

  .separator {
Phil Hughes committed
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
    width: 100%;
    height: 1px;
    margin-top: 8px;
    margin-bottom: 8px;
    background-color: $dropdown-divider-color;
  }

  a {
    display: block;
    position: relative;
    padding-left: 10px;
    padding-right: 10px;
    color: $dropdown-link-color;
    line-height: 34px;
    text-overflow: ellipsis;
    border-radius: 2px;
    white-space: nowrap;
    overflow: hidden;

Phil Hughes committed
134 135 136
    &:hover,
    &:focus,
    &.is-focused {
Phil Hughes committed
137 138
      background-color: $dropdown-link-hover-bg;
      text-decoration: none;
Phil Hughes committed
139
      outline: 0;
Phil Hughes committed
140
    }
141 142 143 144 145 146

    &.dropdown-menu-empty-link {
      &.is-focused {
        background-color: $dropdown-empty-row-bg;
      }
    }
147 148 149 150

    &.dropdown-menu-user-link {
      line-height: 16px;
    }
Phil Hughes committed
151
  }
152 153 154 155 156 157 158 159 160 161 162

  .dropdown-header {
    color: $dropdown-header-color;
    font-size: 13px;
    line-height: 22px;
    padding: 0 10px 10px;
  }

  .separator + .dropdown-header {
    padding-top: 2px;
  }
Phil Hughes committed
163 164
}

165
.dropdown-menu-paging {
166 167
  .dropdown-page-two,
  .dropdown-menu-back {
168 169 170 171 172 173 174 175
    display: none;
  }

  &.is-page-two {
    .dropdown-page-one {
      display: none;
    }

176 177
    .dropdown-page-two,
    .dropdown-menu-back {
178 179
      display: block;
    }
180 181 182 183

    .dropdown-content {
      padding: 0 10px;
    }
184 185 186 187 188 189 190 191 192 193 194 195 196
  }
}

.dropdown-menu-user {
  .avatar {
    float: left;
    width: 30px;
    height: 30px;
    margin: 0 10px 0 0;
  }
}

.dropdown-menu-user-link {
Jacob Schatz committed
197
  padding-top: 10px;
198 199 200 201 202
  padding-bottom: 7px;
}

.dropdown-menu-user-full-name {
  display: block;
Jacob Schatz committed
203
  font-weight: 500;
204
  line-height: 16px;
205 206 207 208 209 210 211
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.dropdown-menu-user-username {
  display: block;
212
  line-height: 16px;
213 214 215 216 217 218
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.dropdown-select {
219
  width: $dropdown-width;
220 221
}

Phil Hughes committed
222 223 224 225 226 227 228 229 230 231 232 233 234
.dropdown-menu-align-right {
  left: auto;
  right: 0;
}

.dropdown-menu-selectable {
  a {
    padding-left: 25px;

    &.is-active {
      &::before {
        content: "\f00c";
        position: absolute;
235 236 237
        left: 5px;
        top: 50%;
        margin-top: -7px;
Phil Hughes committed
238 239 240 241 242 243 244 245 246 247
        font: normal normal normal 14px/1 FontAwesome;
        font-size: inherit;
        text-rendering: auto;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
      }
    }
  }
}

248 249 250

.dropdown-title {
  position: relative;
Phil Hughes committed
251
  padding: 0 25px 10px;
252
  margin: 0 10px 10px;
253 254 255 256 257 258 259 260 261 262 263
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-bottom: 1px solid $dropdown-divider-color;
  overflow: hidden;
}

.dropdown-title-button {
  position: absolute;
264
  top: 0;
265
  padding: 0;
Phil Hughes committed
266
  color: $dropdown-title-btn-color;
267 268 269
  font-size: 14px;
  border: 0;
  background: none;
270
  outline: 0;
271 272

  &:hover {
Phil Hughes committed
273
    color: darken($dropdown-title-btn-color, 15%);
274 275 276 277
  }
}

.dropdown-menu-close {
278
  right: 5px;
279 280
  width: 20px;
  height: 20px;
Phil Hughes committed
281
  top: -3px;
282 283 284
}

.dropdown-menu-back {
285 286
  left: 7px;
  top: 2px;
287 288 289 290 291
}

.dropdown-input {
  position: relative;
  margin-bottom: 10px;
292
  padding: 0 10px;
293 294 295 296

  .fa {
    position: absolute;
    top: 10px;
297
    right: 20px;
298
    color: #c7c7c7;
299 300 301
    font-size: 12px;
    pointer-events: none;
  }
302 303 304 305 306

  .dropdown-input-clear {
    display: none;
    cursor: pointer;
    pointer-events: all;
307 308 309
    right: 22px;
    top: 9px;
    font-size: 14px;
310 311 312 313 314 315 316 317 318 319 320
  }

  &.has-value {
    .dropdown-input-clear {
      display: block;
    }

    .dropdown-input-search {
      display: none;
    }
  }
321 322
}

323
.dropdown-input-field, .default-dropdown-input {
324 325
  width: 100%;
  padding: 0 7px;
Phil Hughes committed
326
  color: $dropdown-input-color;
327 328 329 330 331 332 333
  line-height: 30px;
  border: 1px solid $dropdown-divider-color;
  border-radius: 2px;
  outline: 0;

  &:focus {
    color: $dropdown-link-color;
Phil Hughes committed
334 335
    border-color: $dropdown-input-focus-border;
    box-shadow: 0 0 4px $dropdown-input-focus-shadow;
336

337
    ~ .fa {
338 339 340 341 342
      color: $dropdown-link-color;
    }
  }

  &:hover {
343
    ~ .fa {
344 345 346 347 348 349
      color: $dropdown-link-color;
    }
  }
}

.dropdown-content {
350
  max-height: 215px;
351 352 353 354 355 356 357 358 359 360
  overflow-y: scroll;
}

.dropdown-footer {
  padding-top: 10px;
  margin-top: 10px;
  font-size: 13px;
  border-top: 1px solid $dropdown-divider-color;
}

361 362 363 364 365 366 367
.dropdown-due-date-footer {
  padding-top: 0;
  margin-left: 10px;
  margin-right: 10px;
  border-top: 0;
}

368 369 370 371 372 373 374 375
.dropdown-footer-list {
  font-size: 14px;

  a {
    padding-left: 10px;
  }
}

376 377 378 379 380 381 382 383
.dropdown-loading {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  z-index: 9;
Phil Hughes committed
384
  background-color: $dropdown-loading-bg;
385 386 387 388 389 390 391 392 393 394
  font-size: 28px;

  .fa {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -14px;
    margin-left: -14px;
  }
}
395

396 397 398
.dropdown-label-box {
  position: relative;
  top: 3px;
399
  margin-right: 5px;
400
  display: inline-block;
401 402 403
  width: 15px;
  height: 15px;
  border-radius: $border-radius-base;
404
}
405 406

.dropdown-menu-due-date {
407 408 409 410
  .dropdown-content {
    max-height: 230px;
  }

411 412 413 414 415 416 417 418 419 420 421 422
  .ui-widget {
    table {
      margin: 0;
    }

    &.ui-datepicker-inline {
      padding: 0 10px;
      border: 0;
      width: 100%;
    }

    .ui-datepicker-header {
Phil Hughes committed
423
      padding: 0 8px 10px;
424
      border: 0;
Phil Hughes committed
425 426 427 428 429 430 431 432 433 434

      .ui-icon {
        background: none;
        font-size: 20px;
        text-indent: 0;

        &:before {
          display: block;
          position: relative;
          top: -2px;
Phil Hughes committed
435
          color: $dropdown-title-btn-color;
Phil Hughes committed
436 437 438 439 440 441 442
          font: normal normal normal 14px/1 FontAwesome;
          font-size: inherit;
          text-rendering: auto;
          -webkit-font-smoothing: antialiased;
          -moz-osx-font-smoothing: grayscale;
        }
      }
443 444 445 446 447
    }

    .ui-state-active,
    .ui-state-hover {
      color: $md-link-color;
Phil Hughes committed
448
      background-color: $calendar-hover-bg;
449 450 451 452
    }

    .ui-datepicker-prev,
    .ui-datepicker-next {
Phil Hughes committed
453 454 455 456
      top: 0;
      height: 15px;
      cursor: pointer;

457 458 459
      &:hover {
        background-color: transparent;
        border: 0;
Phil Hughes committed
460 461 462 463

        .ui-icon:before {
          color: $md-link-color;
        }
464 465 466 467
      }
    }

    .ui-datepicker-prev {
Phil Hughes committed
468 469 470 471 472 473
      left: 0;

      .ui-icon:before {
        content: '\f104';
        text-align: left;
      }
474 475 476
    }

    .ui-datepicker-next {
Phil Hughes committed
477 478 479 480 481 482
      right: 0;

      .ui-icon:before {
        content: '\f105';
        text-align: right;
      }
483 484 485 486
    }

    td {
      padding: 0;
Phil Hughes committed
487
      border: 1px solid $calendar-border-color;
488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504

      &:first-child {
        border-left: 0;
      }

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

      a {
        line-height: 17px;
        border: 0;
        border-radius: 0;
      }
    }

    .ui-datepicker-title {
Phil Hughes committed
505
      color: $gl-gray;
506 507 508 509 510 511 512
      font-size: 15px;
      line-height: 1;
      font-weight: normal;
    }
  }

  th {
Phil Hughes committed
513
    padding: 2px 0;
Phil Hughes committed
514
    color: $calendar-header-color;
515 516
    font-weight: normal;
    text-transform: lowercase;
Phil Hughes committed
517
    border-top: 1px solid $calendar-border-color;
518 519 520
  }

  .ui-datepicker-unselectable {
Phil Hughes committed
521
    background-color: $calendar-unselectable-bg;
522 523
  }
}