selects.scss 3.03 KB
Newer Older
1
/** Select2 selectbox style override **/
2
.select2-container, .select2-container.select2-drop-above {
3
  .select2-choice {
4
    background: #FFF;
5
    border-color: #DDD;
6
    height: 42px;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
7
    padding: 8px $gl-padding;
8
    font-size: $gl-font-size;
9
    line-height: 1.42857143;
10

11
    @include border-radius(2px);
12 13 14

    .select2-arrow {
      background: #FFF;
15
      border-left: none;
16
      padding-top: 5px;
17
    }
18 19 20 21 22 23 24 25 26 27

    .select2-chosen {
      color: $gl-text-color;
    }

    &.select2-default {
      .select2-chosen {
        color: #999;
      }
    }
28
  }
29
}
30

31 32 33 34 35
.select2-container .select2-choice, .select2-container.select2-drop-above .select2-choice{
  color: #7f8fa4;
  border: 1px solid #e7e9ed;
}

36

37 38 39
.select2-drop {
  @include box-shadow(rgba(76, 86, 103, 0.247059) 0px 0px 1px 0px, rgba(31, 37, 50, 0.317647) 0px 2px 18px 0px);
  @include border-radius (0px);
40 41

  padding: 16px;
42 43 44 45
  border: none !important;
}

.select2-results .select2-result-label {
46
  padding: 9px;
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
}

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

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

.select2-results li.select2-result-with-children > .select2-result-label {
  font-weight: 600;
  color: #313236;
}

62 63 64 65 66 67
.select2-container-multi {
  .select2-choices {
    @include border-radius(2px);
    border-color: $input-border;
    background: white;
    padding-left: $gl-padding / 2;
68

69 70 71 72 73 74 75
    .select2-search-field input {
      padding: $gl-padding / 2;
      font-size: 13px;
      height: auto;
      font-family: inherit;
      font-size: inherit;
    }
76

77 78 79 80 81 82 83
    .select2-search-choice {
      margin: 8px 0 0 8px;
      background: white;
      box-shadow: none;
      border-color: $input-border;
      color: $gl-text-color;
      line-height: 15px;
84

85 86 87 88 89 90 91 92 93
      .select2-search-choice-close {
        top: 5px;
      }

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

96
.select2-drop-active {
97
  border: 1px solid #BBB !important;
98
  margin-top: 4px;
99
  font-size: 13px;
100

101 102 103 104
  &.select2-drop-above {
    margin-bottom: 8px;
  }

105 106 107 108 109
  .select2-search input {
    background: #fafafa;
    border-color: #DDD;
  }

110 111 112
  .select2-results {
    max-height: 350px;
    .select2-highlighted {
113
      background: $gl-primary;
114
    }
115
  }
116 117
}

118 119
.select2-container {
  width: 100% !important;
120 121
}

122 123
/** Branch/tag selector **/
.project-refs-form .select2-container {
124
  width: 160px !important;
125
}
126

127 128
.ajax-users-dropdown, .ajax-project-users-dropdown {
  .select2-search {
129
    padding-top: 2px;
130
  }
131
}
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
132 133 134 135 136 137 138 139 140 141 142 143 144

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

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

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

145 146 147 148 149 150 151 152 153 154 155 156
.group-result {
  .group-image {
    float: left;
  }
  .group-name {
    font-weight: bold;
  }
  .group-path {
    color: #999;
  }
}

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
157
.user-result {
158 159
  min-height: 24px;

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
160 161 162
  .user-image {
    float: left;
  }
163 164 165 166 167

  &.no-username {
    .user-name {
      line-height: 24px;
    }
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
168 169 170 171 172 173 174 175 176 177 178 179 180
  }
}

.namespace-result {
  .namespace-kind {
    color: #AAA;
    font-weight: normal;
  }
  .namespace-path {
    margin-left: 10px;
    font-weight: bolder;
  }
}
181 182

.ajax-users-dropdown {
183
  min-width: 250px !important;
184
}