BigW Consortium Gitlab

selects.scss 4.66 KB
Newer Older
1
/** Select2 selectbox style override **/
2 3 4 5
.select2-container {
  width: 100% !important;
}

6 7
.select2-container,
.select2-container.select2-drop-above {
8
  .select2-choice {
9
    background: #fff;
10 11
    border-color: $input-border;
    height: 35px;
12
    padding: $gl-vert-padding $gl-input-padding;
13
    font-size: $gl-font-size;
14
    line-height: 1.42857143;
15
    border-radius: $border-radius-base;
16 17

    .select2-arrow {
18 19 20
      background-image: none;
      background-color: transparent;
      border: none;
21 22
      padding-top: 6px;
      padding-right: 10px;
23 24

      b {
25 26 27 28 29
        display: inline-block;
        width: 0;
        height: 0;
        margin-left: 2px;
        vertical-align: middle;
30 31 32
        border-top: 5px dashed;
        border-right: 5px solid transparent;
        border-left: 5px solid transparent;
33 34
        color: $gray-darkest;
      }
35
    }
36 37

    .select2-chosen {
38
      margin-right: 15px;
39 40
    }

41 42 43
    &:hover {
      background-color: $gray-dark;
      border-color: $border-white-normal;
44
      color: $gl-text-color;
45
    }
46
  }
47
}
48

49
.select2-drop {
Clement Ho committed
50 51
  box-shadow: rgba(76, 86, 103, 0.247059) 0 0 1px 0, rgba(31, 37, 50, 0.317647) 0 2px 18px 0;
  border-radius: $border-radius-default;
52
  border: none;
53
  min-width: 175px;
54 55
}

56 57
.select2-results .select2-result-label,
.select2-more-results {
58
  padding: 10px 15px;
59 60
}

61
.select2-drop {
62 63 64 65
  color: #7f8fa4;
}

.select2-highlighted {
66
  background: $gl-link-color !important;
67 68 69 70
}

.select2-results li.select2-result-with-children > .select2-result-label {
  font-weight: 600;
71
  color: $gl-text-color;
72 73
}

74
.select2-container-active {
75 76
  .select2-choice,
  .select2-choices {
Clement Ho committed
77
    box-shadow: none;
78 79 80 81 82 83 84 85 86
  }
}

.select2-dropdown-open {
  .select2-choice {
    border-color: $border-white-normal;
    outline: 0;
    background-image: none;
    background-color: $white-dark;
Clement Ho committed
87
    box-shadow: $gl-btn-active-gradient;
88 89 90
  }
}

91 92
.select2-container-multi {
  .select2-choices {
Clement Ho committed
93
    border-radius: $border-radius-default;
94
    border-color: $input-border;
95
    background: none;
96

97
    .select2-search-field input {
Phil Hughes committed
98
      padding: 5px $gl-padding / 2;
99 100 101 102 103
      font-size: 13px;
      height: auto;
      font-family: inherit;
      font-size: inherit;
    }
104

105
    .select2-search-choice {
106
      margin: 5px 0 0 8px;
107 108 109 110
      box-shadow: none;
      border-color: $input-border;
      color: $gl-text-color;
      line-height: 15px;
111 112
      background-color: $background-color;
      background-image: none;
113

114
      .select2-search-choice-close {
115 116
        top: 4px;
        left: 3px;
117 118 119 120 121 122 123
      }

      &.select2-search-choice-focus {
        border-color: $gl-text-color;
      }
    }
  }
124

125 126 127
  &.select2-container-active .select2-choices,
  &.select2-dropdown-open .select2-choices {
    border-color: $border-white-normal;
Clement Ho committed
128
    box-shadow: $gl-btn-active-gradient;
129 130 131
  }
}

132
.select2-drop-active {
133 134
  margin-top: 6px;
  font-size: 14px;
135

136 137 138 139
  &.select2-drop-above {
    margin-bottom: 8px;
  }

140 141
  .select2-results {
    max-height: 350px;
142

143
    .select2-highlighted {
144
      background: $gl-primary;
145
    }
146
  }
147 148
}

149 150 151 152 153 154
.select2-search {
  padding: 15px 15px 5px;

  .select2-drop-auto-width & {
    padding: 15px 15px 5px;
  }
155 156
}

157 158 159 160
.select2-search input {
  padding: 2px 25px 2px 5px;
  background: #fff image-url('select2.png');
  background-repeat: no-repeat;
161
  background-position: right 0 bottom 6px;
162
  border: 1px solid $input-border;
Clement Ho committed
163
  border-radius: $border-radius-default;
164
  transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
165 166 167 168

  &:focus {
    border-color: $input-border-focus;
  }
169 170
}

171
.select2-search input.select2-active {
172 173
  background-color: #fff;
  background-image: image-url('select2-spinner.gif') !important;
174
  background-repeat: no-repeat;
175 176
  background-position: right 5px center !important;
  background-size: 16px 16px !important;
177 178
}

179 180 181 182 183 184 185 186 187 188 189 190 191
.select2-results .select2-no-results,
.select2-results .select2-searching,
.select2-results .select2-ajax-error,
.select2-results .select2-selection-limit {
  background: $gray-light;
  display: list-item;
  padding: 10px 15px;
}


.select2-results {
  margin: 0;
  padding: 10px 0;
192
}
Dmitriy Zaporozhets committed
193 194 195 196 197 198 199 200 201 202 203 204 205

.ajax-users-select {
  width: 400px;

  &.input-large {
    width: 210px;
  }

  &.input-clamp {
    max-width: 100%;
  }
}

206 207 208 209 210 211 212 213
.select2-highlighted {
  .group-result {
    .group-path {
      color: #fff;
    }
  }
}

214 215 216 217
.group-result {
  .group-image {
    float: left;
  }
218

219 220 221
  .group-name {
    font-weight: bold;
  }
222

223 224 225 226 227
  .group-path {
    color: #999;
  }
}

Dmitriy Zaporozhets committed
228
.user-result {
229 230
  min-height: 24px;

Dmitriy Zaporozhets committed
231 232 233
  .user-image {
    float: left;
  }
234 235 236 237 238

  &.no-username {
    .user-name {
      line-height: 24px;
    }
Dmitriy Zaporozhets committed
239 240 241 242 243
  }
}

.namespace-result {
  .namespace-kind {
244
    color: #aaa;
Dmitriy Zaporozhets committed
245 246
    font-weight: normal;
  }
247

Dmitriy Zaporozhets committed
248 249 250 251 252
  .namespace-path {
    margin-left: 10px;
    font-weight: bolder;
  }
}
253 254

.ajax-users-dropdown {
255
  min-width: 250px !important;
256
}