forked from Cap3/knockout-select
-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.less
126 lines (110 loc) · 7.99 KB
/
style.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
.knockout-select {
@font-size: 14px;
@width: 250px;
@height: 28px;
@spacing: 8px;
@border-radius: 3px;
@border-width: 1px;
@border-color: #c8c8c8;
@inactive-color: #c8c8c8;
@hover-color: #0088d3;
@background-color: white;
@font-face {
font-family: 'knockout-select-icomoon';
src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg6SA20AAAC8AAAAYGNtYXDmwZlXAAABHAAAAGxnYXNwAAAAEAAAAYgAAAAIZ2x5Zjsjvh4AAAGQAAAD9GhlYWQDiHBeAAAFhAAAADZoaGVhB3oDzgAABbwAAAAkaG10eCYABzoAAAXgAAAANGxvY2EFagaIAAAGFAAAABxtYXhwAA8ALwAABjAAAAAgbmFtZVcYpu4AAAZQAAABRXBvc3QAAwAAAAAHmAAAACAAAwQAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADmQwPA/8D/wAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAACAAAAAwAAABQAAwABAAAAFAAEAFgAAAASABAAAwACAAEAIOYh5jfmPOZA5kP//f//AAAAAAAg5iHmNuY75j/mQv/9//8AAf/jGeMZzxnMGcoZyQADAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAA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AAAAABANcBHwMpAnsALAAAAS4BMS4BJy4BIyIGBw4BBzAGBw4BFRQWFx4BMzI2PwEXHgEzMjY3PgE1NCYnAxkQ4QQJBgULBQULBQYJBOEQCAgICAkTCwoWCsjIChYKCxMJCAgICAGDENcEBgMCAgICAwYE1xAIFQwLFgkICQgJwMAJCAkICRYLDBUIAAAAAAEBFAEAAuwCmgACAAABIRMC7P4p6wKa/mYAAAABARQBAALsApoAAgAAASEDARQB1+sBAAGaAAAAAQAAAAAAAMIY+n5fDzz1AAsEAAAAAADQWZYYAAAAANBZlhgAAAAAA7gDMQAAAAgAAgAAAAAAAAABAAADwP/AAAAEAAAAAAADuAABAAAAAAAAAAAAAAAAAAAADQAAAAAAAAAAAAAAAAIAAAAEAACrBAAASAQAAEgEAAEVBAABFAQAANcEAADXBAABFAQAARQAAAAAAAoAFAAeAGgApADiARoBUgGYAd4B7AH6AAEAAAANAC0AAQAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAOAK4AAQAAAAAAAQAOAAAAAQAAAAAAAgAOAEcAAQAAAAAAAwAOACQAAQAAAAAABAAOAFUAAQAAAAAABQAWAA4AAQAAAAAABgAHADIAAQAAAAAACgA0AGMAAwABBAkAAQAOAAAAAwABBAkAAgAOAEcAAwABBAkAAwAOACQAAwABBAkABAAOAFUAAwABBAkABQAWAA4AAwABBAkABgAOADkAAwABBAkACgA0AGMAaQBjAG8AbQBvAG8AbgBWAGUAcgBzAGkAbwBuACAAMAAuADAAaQBjAG8AbQBvAG8Abmljb21vb24AaQBjAG8AbQBvAG8AbgBSAGUAZwB1AGwAYQByAGkAYwBvAG0AbwBvAG4ARgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAuAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=) format('truetype'),
url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAgEAAsAAAAAB7gAAAAAAAAAAAAAA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oAKQA4gEaAVIBmAHeAewB+gABAAAADQAtAAEAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAADgCuAAEAAAAAAAEADgAAAAEAAAAAAAIADgBHAAEAAAAAAAMADgAkAAEAAAAAAAQADgBVAAEAAAAAAAUAFgAOAAEAAAAAAAYABwAyAAEAAAAAAAoANABjAAMAAQQJAAEADgAAAAMAAQQJAAIADgBHAAMAAQQJAAMADgAkAAMAAQQJAAQADgBVAAMAAQQJAAUAFgAOAAMAAQQJAAYADgA5AAMAAQQJAAoANABjAGkAYwBvAG0AbwBvAG4AVgBlAHIAcwBpAG8AbgAgADAALgAwAGkAYwBvAG0AbwBvAG5pY29tb29uAGkAYwBvAG0AbwBvAG4AUgBlAGcAdQBsAGEAcgBpAGMAbwBtAG8AbwBuAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format('woff');
font-weight: normal;
font-style: normal;
}
.box-sizing-border-box {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.disable-selection {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.icon-font {
font-family: 'knockout-select-icomoon';
line-height: inherit;
}
font-size: @font-size;
width: @width;
height: @height;
&-button {
.box-sizing-border-box;
width: 100%;
height: @height;
margin: 0;
padding: 0 @spacing;
background-color: @background-color;
border-radius: @border-radius;
border: @border-width solid @border-color;
cursor: pointer;
text-align: left;
font-size: inherit;
&[disabled] {
background-color: @inactive-color;
cursor: default;
}
&[data-open="true"] {
.knockout-select-arrow:before {
float: right;
.icon-font;
content: "\e637"; // arrow-up
}
}
&[data-open="false"] {
.knockout-select-arrow:before {
float: right;
.icon-font;
content: "\e636"; // arrow-down
}
}
}
&-container {
.box-sizing-border-box;
min-height: @height;
margin: 0;
background-color: @background-color;
border-radius: @border-radius;
border: @border-width solid @border-color;
.knockout-select-row {
.disable-selection;
.box-sizing-border-box;
height: auto;
overflow: hidden;
cursor: default;
padding: (@spacing / 4) (@spacing / 2);
background-color: @background-color;
&.knockout-select-row-selected {
background-color: @hover-color;
color: @background-color;
}
&.knockout-select-row-active {
background-color: @hover-color;
color: @background-color;
outline: @border-width solid @border-color;
}
&:before {
.icon-font;
display: inline-block;
padding-right: @spacing / 2;
font-size: 12px;
width: 12px;
height: inherit;
}
&[data-selected="true"]:before {
content: "\e621"; // check
}
&[data-selected="false"]:before {
content: "";
}
}
}
}