selects.scss 4.6 KB
Newer Older
1
/** Select2 selectbox style override **/
A
Alfredo Sumaran 已提交
2 3 4 5
.select2-container {
  width: 100% !important;
}

6
.select2-container, .select2-container.select2-drop-above {
7
  .select2-choice {
A
Alfredo Sumaran 已提交
8
    background: #fff;
A
Alfredo Sumaran 已提交
9
    border-color: $input-border;
A
Alfredo Sumaran 已提交
10
    border-color: $border-white-light;
A
Alfredo Sumaran 已提交
11 12
    height: 35px;
    padding: $gl-vert-padding $gl-btn-padding;
13
    font-size: $gl-font-size;
14
    line-height: 1.42857143;
15

A
Alfredo Sumaran 已提交
16
    @include border-radius($border-radius-default);
D
Dmitriy Zaporozhets 已提交
17 18

    .select2-arrow {
A
Alfredo Sumaran 已提交
19 20 21
      background-image: none;
      background-color: transparent;
      border: none;
A
Alfredo Sumaran 已提交
22 23
      padding-top: 6px;
      padding-right: 10px;
A
Alfredo Sumaran 已提交
24 25 26 27 28

      b {
        @extend .caret;
        color: $gray-darkest;
      }
D
Dmitriy Zaporozhets 已提交
29
    }
30 31

    .select2-chosen {
A
Alfredo Sumaran 已提交
32
      margin-right: 15px;
33 34
    }

A
Alfredo Sumaran 已提交
35 36 37
    &:hover {
      background-color: $gray-dark;
      border-color: $border-white-normal;
A
Alfredo Sumaran 已提交
38
      color: $gl-text-color;
39
    }
40
  }
41
}
D
Dmitriy Zaporozhets 已提交
42

43
.select2-drop {
C
connorshea 已提交
44
  @include box-shadow(rgba(76, 86, 103, 0.247059) 0 0 1px 0, rgba(31, 37, 50, 0.317647) 0 2px 18px 0);
A
Alfredo Sumaran 已提交
45 46
  @include border-radius ($border-radius-default);
  border: none;
47
  min-width: 175px;
48 49 50
}

.select2-results .select2-result-label {
A
Alfredo Sumaran 已提交
51
  padding: 10px 15px;
52 53 54 55 56 57 58 59 60 61 62 63
}

.select2-drop{
  color: #7f8fa4;
}

.select2-highlighted {
  background: #3084bb !important;
}

.select2-results li.select2-result-with-children > .select2-result-label {
  font-weight: 600;
A
Alfredo Sumaran 已提交
64
  color: $gl-text-color;
65 66
}

A
Alfredo Sumaran 已提交
67 68 69 70 71 72 73 74 75 76 77 78
.select2-container-active {
  .select2-choice, .select2-choices {
    @include box-shadow(none);
  }
}

.select2-dropdown-open {
  .select2-choice {
    border-color: $border-white-normal;
    outline: 0;
    background-image: none;
    background-color: $white-dark;
A
Alfredo Sumaran 已提交
79
    @include box-shadow($gl-btn-active-gradient);
A
Alfredo Sumaran 已提交
80 81 82
  }
}

D
Douwe Maan 已提交
83 84
.select2-container-multi {
  .select2-choices {
A
Alfredo Sumaran 已提交
85
    @include border-radius($border-radius-default);
D
Douwe Maan 已提交
86
    border-color: $input-border;
A
Alfredo Sumaran 已提交
87
    background: none;
88

D
Douwe Maan 已提交
89 90 91 92 93 94 95
    .select2-search-field input {
      padding: $gl-padding / 2;
      font-size: 13px;
      height: auto;
      font-family: inherit;
      font-size: inherit;
    }
96

D
Douwe Maan 已提交
97 98 99 100 101 102
    .select2-search-choice {
      margin: 8px 0 0 8px;
      box-shadow: none;
      border-color: $input-border;
      color: $gl-text-color;
      line-height: 15px;
A
Alfredo Sumaran 已提交
103 104
      background-color: $background-color;
      background-image: none;
105

D
Douwe Maan 已提交
106
      .select2-search-choice-close {
A
Alfredo Sumaran 已提交
107 108
        top: 4px;
        left: 3px;
D
Douwe Maan 已提交
109 110 111 112 113 114 115
      }

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

A
Alfredo Sumaran 已提交
117 118 119
  &.select2-container-active .select2-choices,
  &.select2-dropdown-open .select2-choices {
    border-color: $border-white-normal;
A
Alfredo Sumaran 已提交
120
    @include box-shadow($gl-btn-active-gradient);
A
Alfredo Sumaran 已提交
121 122 123
  }
}

A
Alfredo Sumaran 已提交
124
.select2-container-multi .select2-choices .select2-search-choice {
A
Alfredo Sumaran 已提交
125 126
}

D
Dmitriy Zaporozhets 已提交
127
.select2-drop-active {
A
Alfredo Sumaran 已提交
128 129
  margin-top: 6px;
  font-size: 14px;
D
Dmitriy Zaporozhets 已提交
130

131 132 133 134
  &.select2-drop-above {
    margin-bottom: 8px;
  }

135 136 137
  .select2-results {
    max-height: 350px;
    .select2-highlighted {
138
      background: $gl-primary;
139
    }
D
Dmitriy Zaporozhets 已提交
140
  }
D
Dmitriy Zaporozhets 已提交
141 142
}

A
Alfredo Sumaran 已提交
143 144 145 146 147 148
.select2-search {
  padding: 15px 15px 5px;

  .select2-drop-auto-width & {
    padding: 15px 15px 5px;
  }
A
Alfredo Sumaran 已提交
149 150
}

A
Alfredo Sumaran 已提交
151 152 153 154
.select2-search input {
  padding: 2px 25px 2px 5px;
  background: #fff image-url('select2.png');
  background-repeat: no-repeat;
155
  background-position: right 0 bottom 6px;
A
Alfredo Sumaran 已提交
156 157 158 159 160 161 162
  border: 1px solid $input-border;
  @include border-radius($border-radius-default);
  @include transition(border-color ease-in-out .15s, box-shadow ease-in-out .15s);

  &:focus {
    border-color: $input-border-focus;
  }
A
Alfredo Sumaran 已提交
163 164
}

A
Alfredo Sumaran 已提交
165
.select2-search input.select2-active {
166 167
  background-color: #fff;
  background-image: image-url('select2-spinner.gif') !important;
A
Alfredo Sumaran 已提交
168
  background-repeat: no-repeat;
169 170
  background-position: right 5px center !important;
  background-size: 16px 16px !important;
171 172
}

D
Dmitriy Zaporozhets 已提交
173 174
/** Branch/tag selector **/
.project-refs-form .select2-container {
175
  width: 160px !important;
D
Dmitriy Zaporozhets 已提交
176
}
177

A
Alfredo Sumaran 已提交
178 179 180 181 182 183 184 185 186 187 188 189 190
.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;
191
}
D
Dmitriy Zaporozhets 已提交
192 193 194 195 196 197 198 199 200 201 202 203 204

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

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

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

205 206 207 208 209 210 211 212 213 214 215 216
.group-result {
  .group-image {
    float: left;
  }
  .group-name {
    font-weight: bold;
  }
  .group-path {
    color: #999;
  }
}

D
Dmitriy Zaporozhets 已提交
217
.user-result {
218 219
  min-height: 24px;

D
Dmitriy Zaporozhets 已提交
220 221 222
  .user-image {
    float: left;
  }
223 224 225 226 227

  &.no-username {
    .user-name {
      line-height: 24px;
    }
D
Dmitriy Zaporozhets 已提交
228 229 230 231 232
  }
}

.namespace-result {
  .namespace-kind {
233
    color: #aaa;
D
Dmitriy Zaporozhets 已提交
234 235 236 237 238 239 240
    font-weight: normal;
  }
  .namespace-path {
    margin-left: 10px;
    font-weight: bolder;
  }
}
241 242

.ajax-users-dropdown {
243
  min-width: 250px !important;
244
}