summaryrefslogtreecommitdiff
path: root/app/assets/stylesheets/framework/dropdowns.scss
blob: d4878b333f94b10cfdfb1536dbb6f37cde449d64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
.caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 2px;
  vertical-align: middle;
  border-top: $caret-width-base dashed $dropdown-caret-color;
  border-right: $caret-width-base solid transparent;
  border-left: $caret-width-base solid transparent;
}

.dropdown {
  position: relative;
}

.open {
  .dropdown-menu {
    display: block;
  }
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 9999;
  width: 240px;
  margin-top: 2px;
  margin-bottom: 0;
  padding: 10px 10px;
  font-size: 14px;
  font-weight: normal;
  background-color: $dropdown-bg;
  border: 1px solid $dropdown-border-color;
  border-radius: $border-radius-base;
  box-shadow: 0 2px 4px $dropdown-shadow-color;

  li {
    text-align: left;
    list-style: none;
  }

  .divider {
    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;

    &:hover {
      background-color: $dropdown-link-hover-bg;
      text-decoration: none;
    }
  }
}

.dropdown-menu-align-right {
  left: auto;
  right: 0;
}

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

    &.is-active {
      &::before {
        content: "\f00c";
        position: absolute;
        left: 4px;
        top: 8px;
        font: normal normal normal 14px/1 FontAwesome;
        font-size: inherit;
        text-rendering: auto;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
      }
    }
  }
}

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