checkbox.variables
5.01 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
/*******************************
Checkbox
*******************************/
@checkboxSize: 17px;
@checkboxColor: @textColor;
@checkboxLineHeight: @checkboxSize;
/* Label */
@labelDistance: 1.85714em; /* 26px @ 14/em */
/* Checkbox */
@checkboxBackground: @white;
@checkboxBorder: 1px solid @solidBorderColor;
@checkboxBorderRadius: @3px;
@checkboxTransition:
border @defaultDuration @defaultEasing,
opacity @defaultDuration @defaultEasing,
transform @defaultDuration @defaultEasing,
box-shadow @defaultDuration @defaultEasing
;
/* Checkmark */
@checkboxCheckFontSize: 14px;
@checkboxCheckTop: 0px;
@checkboxCheckLeft: 0px;
@checkboxCheckSize: @checkboxSize;
/* Label */
@labelFontSize: @relativeMedium;
@labelColor: @textColor;
@labelTransition: color @defaultDuration @defaultEasing;
/*-------------------
States
--------------------*/
/* Hover */
@checkboxHoverBackground: @checkboxBackground;
@checkboxHoverBorderColor: @selectedBorderColor;
@labelHoverColor: @hoveredTextColor;
/* Pressed */
@checkboxPressedBackground: @offWhite;
@checkboxPressedBorderColor: @selectedBorderColor;
@checkboxPressedColor: @selectedTextColor;
@labelPressedColor: @selectedTextColor;
/* Focus */
@checkboxFocusBackground: @white;
@checkboxFocusBorderColor: @focusedFormMutedBorderColor;
@checkboxFocusCheckColor: @selectedTextColor;
@labelFocusColor: @selectedTextColor;
/* Active */
@labelActiveColor: @selectedTextColor;
@checkboxActiveBackground: @white;
@checkboxActiveBorderColor: @selectedBorderColor;
@checkboxActiveCheckColor: @selectedTextColor;
@checkboxActiveCheckOpacity: 1;
/* Active Focus */
@checkboxActiveFocusBackground: @white;
@checkboxActiveFocusBorderColor: @checkboxFocusBorderColor;
@checkboxActiveFocusCheckColor: @selectedTextColor;
/* Indeterminate */
@checkboxIndeterminateBackground: @checkboxActiveBackground;
@checkboxIndeterminateBorderColor: @checkboxActiveBorderColor;
@checkboxIndeterminateCheckOpacity: 1;
@checkboxIndeterminateCheckColor: @checkboxActiveCheckColor;
/* Disabled */
@disabledCheckboxOpacity: 0.5;
@disabledCheckboxLabelColor: rgba(0, 0, 0, 1);
/*-------------------
Types
--------------------*/
/* Radio */
/* Uses px to avoid rounding issues with circles */
@radioSize: 15px;
@radioTop: 1px;
@radioLeft: 0px;
@radioLabelDistance: @labelDistance;
@bulletTop: 1px;
@bulletLeft: 0px;
@bulletScale: (7 / 15); /* 7px as unitless value from radio size */
@bulletColor: @textColor;
@bulletRadius: @circularRadius;
@radioFocusBackground: @checkboxFocusBackground;
@radioFocusBulletColor: @checkboxFocusCheckColor;
@radioActiveBackground: @checkboxActiveBackground;
@radioActiveBulletColor: @checkboxActiveCheckColor;
@radioActiveFocusBackground: @checkboxActiveFocusBackground;
@radioActiveFocusBulletColor: @checkboxActiveFocusCheckColor;
/* Slider & Toggle Handle */
@handleBackground: @white @subtleGradient;
@handleBoxShadow:
@subtleShadow,
0px 0px 0px 1px @borderColor inset
;
/* Slider */
@sliderHandleSize: 1.5rem;
@sliderLineWidth: 3.5rem;
@sliderTransitionDuration: 0.3s;
@sliderHandleOffset: (1rem - @sliderHandleSize) / 2;
@sliderHandleTransition: left @sliderTransitionDuration @defaultEasing;
@sliderWidth: @sliderLineWidth;
@sliderHeight: (@sliderHandleSize + @sliderHandleOffset);
@sliderLineHeight: @3px;
@sliderLineVerticalOffset: 0.4rem;
@sliderLineColor: @transparentBlack;
@sliderLineRadius: @circularRadius;
@sliderLineTransition: background @sliderTransitionDuration @defaultEasing;
@sliderTravelDistance: @sliderLineWidth - @sliderHandleSize;
@sliderLabelDistance: @sliderLineWidth + 1rem;
@sliderOffLabelColor: @unselectedTextColor;
@sliderLabelLineHeight: 1rem;
/* Slider States */
@sliderHoverLaneBackground: @veryStrongTransparentBlack;
@sliderHoverLabelColor: @hoveredTextColor;
@sliderOnLineColor: @lightBlack;
@sliderOnLabelColor: @selectedTextColor;
@sliderOnFocusLineColor: @lightBlackFocus;
@sliderOnFocusLabelColor: @sliderOnLabelColor;
/* Toggle */
@toggleLaneWidth: 3.5rem;
@toggleHandleSize: 1.5rem;
@toggleTransitionDuration: 0.2s;
@toggleWidth: @toggleLaneWidth;
@toggleHeight: @toggleHandleSize;
@toggleHandleRadius: @circularRadius;
@toggleHandleOffset: 0rem;
@toggleHandleTransition:
background @sliderTransitionDuration @defaultEasing,
left @sliderTransitionDuration @defaultEasing
;
@toggleLaneBackground: @transparentBlack;
@toggleLaneHeight: @toggleHandleSize;
@toggleLaneBoxShadow: none;
@toggleLaneVerticalOffset: 0rem;
@toggleOffOffset: -0.05rem;
@toggleOnOffset: (@toggleLaneWidth - @toggleHandleSize) + 0.15rem;
@toggleLabelDistance: @toggleLaneWidth + 1rem;
@toggleLabelLineHeight: 1.5rem;
@toggleLabelOffset: 0.15em;
@toggleFocusColor: @veryStrongTransparentBlack;
@toggleHoverColor: @toggleFocusColor;
@toggleOffLabelColor: @checkboxColor;
@toggleOffHandleBoxShadow: @handleBoxShadow;
@toggleOnLabelColor: @selectedTextColor;
@toggleOnLaneColor: @primaryColor;
@toggleOnHandleBoxShadow: @handleBoxShadow;
@toggleOnFocusLaneColor: @primaryColorFocus;
@toggleOnFocusLabelColor: @toggleOnLabelColor;
/*-------------------
Variations
--------------------*/