BigW Consortium Gitlab

dropdowns.scss 9.15 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
.open {
23 24
  .dropdown-menu,
  .dropdown-menu-nav {
25
    display: block;
26 27 28
    @media (max-width: $screen-xs-max) {
      width: 100%;
    }
Phil Hughes committed
29
  }
30 31 32 33 34 35 36 37 38 39 40 41

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

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

.dropdown-menu-toggle {
  position: relative;
42
  width: 160px;
Phil Hughes committed
43
  padding: 6px 20px 6px 10px;
44 45 46 47 48
  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
49
  border-radius: $border-radius-base;
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
  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;
    }
  }
71 72 73 74

  &.large {
    width: 200px;
  }
Phil Hughes committed
75 76
}

77 78
.dropdown-menu,
.dropdown-menu-nav {
Phil Hughes committed
79 80 81 82
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
83
  z-index: 9;
Phil Hughes committed
84 85
  width: 240px;
  margin-top: 2px;
86
  margin-bottom: 0;
87
  font-size: 15px;
88
  font-weight: normal;
89
  padding: 8px 0;
Phil Hughes committed
90 91
  background-color: $dropdown-bg;
  border: 1px solid $dropdown-border-color;
Phil Hughes committed
92
  border-radius: $border-radius-base;
Phil Hughes committed
93 94
  box-shadow: 0 2px 4px $dropdown-shadow-color;

95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
  &.is-loading {
    .dropdown-content {
      display: none;
    }

    .dropdown-loading {
      display: block;
    }
  }

  ul {
    margin: 0;
    padding: 0;
  }

Phil Hughes committed
110 111 112
  li {
    text-align: left;
    list-style: none;
113
    padding: 0 8px;
Phil Hughes committed
114 115 116
  }

  .divider {
117
    height: 1px;
118
    margin: 8px;
119 120 121 122 123
    padding: 0;
    background-color: $dropdown-divider-color;
  }

  .separator {
Phil Hughes committed
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;
134
    padding: 5px 8px;
Phil Hughes committed
135
    color: $dropdown-link-color;
136
    line-height: initial;
Phil Hughes committed
137 138 139 140 141
    text-overflow: ellipsis;
    border-radius: 2px;
    white-space: nowrap;
    overflow: hidden;

Phil Hughes committed
142 143 144
    &:hover,
    &:focus,
    &.is-focused {
Phil Hughes committed
145 146
      background-color: $dropdown-link-hover-bg;
      text-decoration: none;
Phil Hughes committed
147
      outline: 0;
Phil Hughes committed
148
    }
149 150 151 152 153 154

    &.dropdown-menu-empty-link {
      &.is-focused {
        background-color: $dropdown-empty-row-bg;
      }
    }
155 156 157 158

    &.dropdown-menu-user-link {
      line-height: 16px;
    }
Phil Hughes committed
159
  }
160 161 162 163 164

  .dropdown-header {
    color: $dropdown-header-color;
    font-size: 13px;
    line-height: 22px;
165
    padding: 0 10px;
166 167 168 169 170
  }

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

173 174 175 176 177 178 179 180 181 182
.dropdown-menu-large {
  width: 340px;
}

.dropdown-menu-no-wrap {
  a {
    white-space: normal;
  }
}

Phil Hughes committed
183 184 185 186
.dropdown-menu-full-width {
  width: 100%;
}

187
.dropdown-menu-paging {
188 189
  .dropdown-page-two,
  .dropdown-menu-back {
190 191 192 193 194 195 196 197
    display: none;
  }

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

198 199
    .dropdown-page-two,
    .dropdown-menu-back {
200 201
      display: block;
    }
202 203 204 205

    .dropdown-content {
      padding: 0 10px;
    }
206 207 208 209 210 211 212 213 214 215 216 217 218
  }
}

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

.dropdown-menu-user-link {
Jacob Schatz committed
219
  padding-top: 10px;
220 221 222 223 224
  padding-bottom: 7px;
}

.dropdown-menu-user-full-name {
  display: block;
Jacob Schatz committed
225
  font-weight: 500;
226
  line-height: 16px;
227 228 229 230 231 232 233
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.dropdown-menu-user-username {
  display: block;
234
  line-height: 16px;
235 236 237 238 239 240
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.dropdown-select {
241
  width: $dropdown-width;
242 243
}

Phil Hughes committed
244 245 246 247 248 249 250 251 252
.dropdown-menu-align-right {
  left: auto;
  right: 0;
}

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

Alfredo Sumaran committed
253
    &.is-indeterminate, &.is-active {
Phil Hughes committed
254 255
      &::before {
        position: absolute;
256
        left: 5px;
257
        top: 8px;
Phil Hughes committed
258 259 260 261 262 263 264
        font: normal normal normal 14px/1 FontAwesome;
        font-size: inherit;
        text-rendering: auto;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
      }
    }
265

266
    &.is-indeterminate::before {
267 268 269 270 271 272
      content: "\f068";
    }

    &.is-active::before {
      content: "\f00c";
    }
Phil Hughes committed
273 274 275
  }
}

276 277 278

.dropdown-title {
  position: relative;
Phil Hughes committed
279
  padding: 0 25px 10px;
280
  margin: 0 10px 10px;
281 282 283 284 285 286 287 288 289 290 291
  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;
292
  top: 0;
293
  padding: 0;
Phil Hughes committed
294
  color: $dropdown-title-btn-color;
295 296 297
  font-size: 14px;
  border: 0;
  background: none;
298
  outline: 0;
299 300

  &:hover {
Phil Hughes committed
301
    color: darken($dropdown-title-btn-color, 15%);
302 303 304 305
  }
}

.dropdown-menu-close {
306
  right: 5px;
307 308
  width: 20px;
  height: 20px;
Phil Hughes committed
309
  top: -3px;
310 311 312
}

.dropdown-menu-back {
313 314
  left: 7px;
  top: 2px;
315 316 317 318 319
}

.dropdown-input {
  position: relative;
  margin-bottom: 10px;
320
  padding: 0 10px;
321 322 323 324

  .fa {
    position: absolute;
    top: 10px;
325
    right: 20px;
326
    color: #c7c7c7;
327 328 329
    font-size: 12px;
    pointer-events: none;
  }
330 331 332 333 334

  .dropdown-input-clear {
    display: none;
    cursor: pointer;
    pointer-events: all;
335 336 337
    right: 22px;
    top: 9px;
    font-size: 14px;
338 339 340 341 342 343 344 345 346 347 348
  }

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

    .dropdown-input-search {
      display: none;
    }
  }
349 350
}

351
.dropdown-input-field, .default-dropdown-input {
352 353
  width: 100%;
  padding: 0 7px;
Phil Hughes committed
354
  color: $dropdown-input-color;
355 356 357 358 359 360 361
  line-height: 30px;
  border: 1px solid $dropdown-divider-color;
  border-radius: 2px;
  outline: 0;

  &:focus {
    color: $dropdown-link-color;
Phil Hughes committed
362 363
    border-color: $dropdown-input-focus-border;
    box-shadow: 0 0 4px $dropdown-input-focus-shadow;
364

365
    ~ .fa {
366 367 368 369 370
      color: $dropdown-link-color;
    }
  }

  &:hover {
371
    ~ .fa {
372 373 374 375 376 377
      color: $dropdown-link-color;
    }
  }
}

.dropdown-content {
378
  max-height: 215px;
379 380 381 382 383 384 385 386 387 388
  overflow-y: scroll;
}

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

389 390 391 392 393 394 395
.dropdown-due-date-footer {
  padding-top: 0;
  margin-left: 10px;
  margin-right: 10px;
  border-top: 0;
}

396 397 398 399 400 401 402 403
.dropdown-footer-list {
  font-size: 14px;

  a {
    padding-left: 10px;
  }
}

404 405 406 407 408 409 410 411
.dropdown-loading {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  z-index: 9;
Phil Hughes committed
412
  background-color: $dropdown-loading-bg;
413 414 415 416 417 418 419 420 421 422
  font-size: 28px;

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

424 425 426
.dropdown-label-box {
  position: relative;
  top: 3px;
427
  margin-right: 5px;
428
  display: inline-block;
429 430 431
  width: 15px;
  height: 15px;
  border-radius: $border-radius-base;
432
}
433 434

.dropdown-menu-due-date {
435 436 437 438
  .dropdown-content {
    max-height: 230px;
  }

439 440 441 442 443 444 445 446 447 448 449 450
  .ui-widget {
    table {
      margin: 0;
    }

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

    .ui-datepicker-header {
Phil Hughes committed
451
      padding: 0 8px 10px;
452
      border: 0;
Phil Hughes committed
453 454 455 456 457 458 459 460 461 462

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

        &:before {
          display: block;
          position: relative;
          top: -2px;
Phil Hughes committed
463
          color: $dropdown-title-btn-color;
Phil Hughes committed
464 465 466 467 468 469 470
          font: normal normal normal 14px/1 FontAwesome;
          font-size: inherit;
          text-rendering: auto;
          -webkit-font-smoothing: antialiased;
          -moz-osx-font-smoothing: grayscale;
        }
      }
471 472
    }

473 474 475 476 477 478
    .ui-datepicker-calendar {
      .ui-state-hover,
      .ui-state-active {
        color: #fff;
        border: 0;
      }
479 480 481 482
    }

    .ui-datepicker-prev,
    .ui-datepicker-next {
Phil Hughes committed
483 484 485 486
      top: 0;
      height: 15px;
      cursor: pointer;

487 488 489
      &:hover {
        background-color: transparent;
        border: 0;
Phil Hughes committed
490 491 492 493

        .ui-icon:before {
          color: $md-link-color;
        }
494 495 496 497
      }
    }

    .ui-datepicker-prev {
Phil Hughes committed
498 499 500 501 502 503
      left: 0;

      .ui-icon:before {
        content: '\f104';
        text-align: left;
      }
504 505 506
    }

    .ui-datepicker-next {
Phil Hughes committed
507 508 509 510 511 512
      right: 0;

      .ui-icon:before {
        content: '\f105';
        text-align: right;
      }
513 514 515 516
    }

    td {
      padding: 0;
Phil Hughes committed
517
      border: 1px solid $calendar-border-color;
518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534

      &: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
535
      color: $gl-gray;
536 537 538 539 540 541 542
      font-size: 15px;
      line-height: 1;
      font-weight: normal;
    }
  }

  th {
Phil Hughes committed
543
    padding: 2px 0;
Phil Hughes committed
544
    color: $calendar-header-color;
545 546
    font-weight: normal;
    text-transform: lowercase;
Phil Hughes committed
547
    border-top: 1px solid $calendar-border-color;
548 549 550
  }

  .ui-datepicker-unselectable {
Phil Hughes committed
551
    background-color: $calendar-unselectable-bg;
552 553
  }
}
554 555 556

.dropdown-menu-inner-title {
  display: block;
Phil Hughes committed
557
  color: $gl-title-color;
558 559 560 561 562
  font-weight: 600;
}

.dropdown-menu-inner-content {
  display: block;
Phil Hughes committed
563
  color: $gl-placeholder-color;
564
}