forked from selectize/selectize.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
selectize.bootstrap3.less
150 lines (135 loc) · 4.75 KB
/
selectize.bootstrap3.less
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/**
* selectize.bootstrap3.css (v0.12.1) - Bootstrap 3 Theme
* Copyright (c) 2013–2015 Brian Reavis & contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
* @author Brian Reavis <brian@thirdroute.com>
*/
@import "selectize";
@selectize-fonts-family: inherit;
@selectize-font-size: inherit;
@selectize-line-height: @line-height-computed;
@selectize-color-text: @text-color;
@selectize-color-highlight: rgba(255,237,40,0.4);
@selectize-color-input: @input-bg;
@selectize-color-input-full: @input-bg;
@selectize-color-input-error: @state-danger-text;
@selectize-color-input-error-focus: darken(@selectize-color-input-error, 10%);
@selectize-color-disabled: @input-bg;
@selectize-color-item: #efefef;
@selectize-color-item-border: rgba(0,0,0,0);
@selectize-color-item-active: @component-active-bg;
@selectize-color-item-active-text: #fff;
@selectize-color-item-active-border: rgba(0,0,0,0);
@selectize-color-optgroup: @dropdown-bg;
@selectize-color-optgroup-text: @dropdown-header-color;
@selectize-color-optgroup-border: @dropdown-divider-bg;
@selectize-color-dropdown: @dropdown-bg;
@selectize-color-dropdown-border-top: mix(@input-border, @input-bg, 0.8);
@selectize-color-dropdown-item-active: @dropdown-link-hover-bg;
@selectize-color-dropdown-item-active-text: @dropdown-link-hover-color;
@selectize-color-dropdown-item-create-active-text: @dropdown-link-hover-color;
@selectize-opacity-disabled: 0.5;
@selectize-shadow-input: none;
@selectize-shadow-input-focus: inset 0 1px 2px rgba(0,0,0,0.15);
@selectize-shadow-input-error: inset 0 1px 1px rgba(0, 0, 0, .075);
@selectize-shadow-input-error-focus: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px lighten(@selectize-color-input-error, 20%);
@selectize-border: 1px solid @input-border;
@selectize-border-radius: @input-border-radius;
@selectize-width-item-border: 0;
@selectize-padding-x: @padding-base-horizontal;
@selectize-padding-y: @padding-base-vertical;
@selectize-padding-dropdown-item-x: @padding-base-horizontal;
@selectize-padding-dropdown-item-y: 3px;
@selectize-padding-item-x: 3px;
@selectize-padding-item-y: 1px;
@selectize-margin-item-x: 3px;
@selectize-margin-item-y: 3px;
@selectize-caret-margin: 0;
@selectize-arrow-size: 5px;
@selectize-arrow-color: @selectize-color-text;
@selectize-arrow-offset: @selectize-padding-x + 5px;
.selectize-dropdown, .selectize-dropdown.form-control {
height: auto;
padding: 0;
margin: 2px 0 0 0;
z-index: @zindex-dropdown;
background: @selectize-color-dropdown;
border: 1px solid @dropdown-fallback-border;
border: 1px solid @dropdown-border;
.selectize-border-radius(@border-radius-base);
.selectize-box-shadow(0 6px 12px rgba(0,0,0,.175));
}
.selectize-dropdown {
.optgroup-header {
font-size: @font-size-small;
line-height: @line-height-base;
}
.optgroup:first-child:before {
display: none;
}
.optgroup:before {
content: ' ';
display: block;
.nav-divider();
margin-left: @selectize-padding-dropdown-item-x * -1;
margin-right: @selectize-padding-dropdown-item-x * -1;
}
}
.selectize-dropdown-content {
padding: 5px 0;
}
.selectize-dropdown-header {
padding: @selectize-padding-dropdown-item-y * 2 @selectize-padding-dropdown-item-x;
}
.selectize-input {
min-height: @input-height-base;
&.dropdown-active {
.selectize-border-radius(@selectize-border-radius);
}
&.dropdown-active::before {
display: none;
}
&.focus {
@color: @input-border-focus;
@color-rgba: rgba(red(@color), green(@color), blue(@color), .6);
border-color: @color;
outline: 0;
.selectize-box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}");
}
}
.has-error .selectize-input {
border-color: @selectize-color-input-error;
.selectize-box-shadow(@selectize-shadow-input-error);
&:focus {
border-color: @selectize-color-input-error-focus;
.selectize-box-shadow(@selectize-shadow-input-error-focus);
}
}
.selectize-control {
&.multi {
.selectize-input.has-items {
padding-left: @selectize-padding-x - @selectize-padding-item-x;
padding-right: @selectize-padding-x - @selectize-padding-item-x;
}
.selectize-input > div {
.selectize-border-radius(@selectize-border-radius - 1px);
}
}
}
.form-control.selectize-control {
padding: 0;
height: auto;
border: none;
background: none;
.selectize-box-shadow(none);
.selectize-border-radius(0);
}