thirdparty-select2.less
2.68 KB
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
.enable_plugin_select2() when(@enable-plugin-select2 = true) {
.select2-container--default .select2-selection {
.border-radius(0);
line-height: 24px;
}
.select2-container--default .select2-selection {
border-color: #AAA;
}
.select2-container--default.select2-container--focus .select2-selection {
border-color: #4492C9;
}
.select2-container--open .select2-dropdown {
.border-radius(0);
}
.select2-container--open .select2-dropdown {
border-color: #4492c9;
.box-shadow(~"0 -4px 5px rgba(0, 0, 0, 0.15)");
}
.select2-container--default .select2-selection .select2-selection__clear {
position: absolute;
right: -32px;
font-size: 16px;
}
.select2-container .select2-selection--single {
height: 32px;
}
.select2-container--default .select2-selection .select2-selection__choice__remove {
font-size: 15px;
margin-right: 3px;
}
.select2-container--default .select2-results__option[aria-selected="true"] {
background-color: #E4EEF5;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
background-color: #4F99C6;
}
.select2-search {
background: none;
&:before {
font-family: FontAwesome;
font-size: @base-font-size - 1;
display: inline;
content: "\f002";
color: #888;
position: absolute;
right: 12px;
top: 8px;
}
&:hover:before {
color:#555;
}
}
.select2-selection--multiple .select2-search:before {
display: none;
}
.select2-container--default .select2-selection {
.form-group.has-error & {
border-color:@error-state-border !important;
}
.form-group.has-info & {
border-color:@info-state-border !important;
}
.form-group.has-warning & {
border-color:@warning-state-border !important;
}
.form-group.has-success & {
border-color:@success-state-border !important;
}
}
//a second style (like tag inpit)
.enable_plugin_select2_style_2() when(@enable-plugin-select2-style-2 = true) {
.select2.tag-input-style {
.select2-selection .select2-selection__choice {
background-color:@tag-bg;
color: #FFFFFF;
display: inline-block;
font-size: @base-font-size;
font-weight: normal;
margin-bottom: 2px;
margin-right: 2px;
padding: 6px 22px 7px 9px;
position: relative;
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15);
transition: all 0.2s ease 0s;
vertical-align: baseline;
white-space: nowrap;
border:none;
.box-shadow(none);
.border-radius(0);
.select2-selection__choice__remove {
position: absolute;
top:0;
bottom:0;
right:-2px;
left: auto;
width: 18px;
height: auto;
line-height: 36px;
text-align: center;
color: #FFF;
&:hover {
background-color: rgba(0,0,0,0.2);
color: #FFF;
}
}
}
}
}
.enable_plugin_select2_style_2();
}
.enable_plugin_select2();