Commit | Line | Data |
---|---|---|
b30809e4 CW |
1 | /* CiviCRM navigation menu stylesheet */ |
2 | ||
3 | #civicrm-menu-nav { | |
4 | line-height: 0; | |
5 | text-align: left; | |
6 | font-size: 13px; | |
7 | } | |
8 | #civicrm-menu { | |
9 | background-color: #f2f2f2; | |
10 | width: 100%; | |
11 | z-index: 500; | |
12 | height: auto; | |
13 | margin: 0; | |
14 | } | |
15 | #civicrm-menu i { | |
16 | margin-right: 3px; | |
17 | } | |
18 | #civicrm-menu li { | |
19 | border: none; | |
20 | padding: 0; | |
21 | } | |
22 | #civicrm-menu li a { | |
23 | padding: 12px 8px; | |
24 | text-decoration: none; | |
25 | color: #333; | |
26 | box-shadow: none; | |
27 | border: none; | |
28 | } | |
29 | #civicrm-menu li a[href="#"] { | |
30 | cursor: default; | |
31 | } | |
32 | #civicrm-menu li li a { | |
33 | padding: 6px 36px 6px 10px; | |
34 | } | |
35 | #civicrm-menu li.crm-menu-border-bottom:not(:last-child) { | |
36 | border-bottom: 1px solid #bbb; | |
37 | } | |
38 | #civicrm-menu li:not(.crm-menu-border-bottom) + li.crm-menu-border-top { | |
39 | border-top: 1px solid #bbb; | |
40 | } | |
41 | #civicrm-menu li a:focus, | |
42 | #civicrm-menu li a:hover, | |
43 | #civicrm-menu li a.highlighted { | |
44 | text-decoration: none; | |
45 | background-color: #fff; | |
46 | } | |
47 | #civicrm-menu li li .sub-arrow:before { | |
48 | content: "\f0da"; | |
49 | font-family: 'FontAwesome'; | |
50 | color: #666; | |
51 | float: right; | |
52 | margin-right: -25px; | |
53 | } | |
54 | /* x icon */ | |
55 | #crm-menubar-state:checked ~ .crm-menubar-toggle-btn .crm-menubar-toggle-btn-icon { | |
56 | height: 0; | |
57 | background: transparent; | |
58 | } | |
59 | #crm-menubar-state:checked ~ .crm-menubar-toggle-btn .crm-menubar-toggle-btn-icon:before { | |
60 | top: 0; | |
61 | -webkit-transform: rotate(-45deg); | |
62 | transform: rotate(-45deg); | |
63 | } | |
64 | #crm-menubar-state:checked ~ .crm-menubar-toggle-btn .crm-menubar-toggle-btn-icon:after { | |
65 | top: 0; | |
66 | -webkit-transform: rotate(45deg); | |
67 | transform: rotate(45deg); | |
68 | } | |
69 | /* hide menu state checkbox (keep it visible to screen readers) */ | |
70 | #civicrm-menu-nav #crm-menubar-state { | |
71 | position: absolute; | |
72 | width: 1px; | |
73 | height: 1px; | |
74 | margin: -1px; | |
75 | border: 0; | |
76 | padding: 0; | |
77 | overflow: hidden; | |
78 | clip: rect(1px,1px,1px,1px); | |
79 | } | |
80 | #civicrm-menu-nav .crm-menubar-toggle-btn { | |
81 | position: relative; | |
82 | display: inline-block; | |
83 | width: 57px; | |
84 | height: 28px; | |
85 | text-indent: 28px; | |
86 | white-space: nowrap; | |
87 | overflow: hidden; | |
88 | cursor: pointer; | |
89 | color: transparent; | |
90 | -webkit-tap-highlight-color: rgba(0,0,0,0); | |
91 | background-color: #333; | |
92 | } | |
93 | ||
94 | /* responsive icon */ | |
95 | ||
96 | #civicrm-menu-nav .crm-menubar-toggle-btn-icon, | |
97 | #civicrm-menu-nav .crm-menubar-toggle-btn-icon:before, | |
98 | #civicrm-menu-nav .crm-menubar-toggle-btn-icon:after { | |
99 | position: absolute; | |
100 | top: 50%; | |
101 | left: 27px; | |
102 | height: 2px; | |
103 | width: 24px; | |
104 | background: #bbb; | |
105 | -webkit-transition: all 0.25s; | |
106 | transition: all 0.25s; | |
107 | } | |
108 | #civicrm-menu-nav .crm-menubar-toggle-btn-icon:before { | |
109 | content: ''; | |
110 | top: -7px; | |
111 | left: 0; | |
112 | } | |
113 | #civicrm-menu-nav .crm-menubar-toggle-btn-icon:after { | |
114 | content: ''; | |
115 | top: 7px; | |
116 | left: 0; | |
117 | } | |
118 | ||
119 | /* Quicksearch */ | |
120 | #crm-qsearch { | |
121 | padding: 1px 0 1px 2px; | |
122 | background-color: transparent !important; | |
123 | } | |
124 | #civicrm-menu #crm-qsearch > a { | |
125 | padding: 2px 0 0 2px; | |
126 | } | |
127 | ||
128 | input#crm-qsearch-input { | |
129 | box-sizing: border-box; | |
130 | background-color: #eaeaea; | |
131 | font-size: 13px; | |
132 | border: 1px solid #ccc; | |
133 | margin: 4px 4px 0; | |
134 | padding: 2px 8px; | |
135 | height: 30px; | |
136 | width: 30px; | |
137 | transition: width .5s .05s, background-color .3s .05s; | |
138 | } | |
139 | a.highlighted #crm-qsearch-input, | |
140 | #crm-qsearch-input:focus, | |
141 | #crm-qsearch-input.has-user-input { | |
142 | background-color: white; | |
143 | width: 130px; | |
144 | } | |
145 | input#crm-qsearch-input:-ms-input-placeholder { | |
146 | font-family: 'FontAwesome'; | |
147 | } | |
148 | input#crm-qsearch-input::-webkit-input-placeholder { | |
149 | font-family: 'FontAwesome'; | |
150 | } | |
151 | input#crm-qsearch-input::-moz-placeholder { | |
152 | font-family: 'FontAwesome'; | |
153 | } | |
154 | input#crm-qsearch-input::placeholder { | |
155 | font-family: 'FontAwesome'; | |
156 | } | |
157 | ||
158 | ul.crm-quickSearch-results { | |
159 | z-index: 100001; | |
160 | } | |
161 | ul.crm-quickSearch-results.ui-state-disabled { | |
162 | opacity: .8; | |
163 | } | |
164 | ||
165 | #civicrm-menu-nav .crm-logo-sm { | |
166 | background: url(../i/logo_sm.png) no-repeat; | |
167 | display: inline-block; | |
168 | width: 16px; | |
169 | height: 16px; | |
170 | margin: 0 2px; | |
171 | } | |
172 | ||
173 | #civicrm-menu #crm-menubar-toggle-position { | |
174 | float: right; | |
175 | } | |
176 | #civicrm-menu #crm-menubar-toggle-position a i { | |
177 | color: #888; | |
178 | margin: 0; | |
179 | border-top: 2px solid #888; | |
180 | font-size: 11px; | |
181 | } | |
182 | body.crm-menubar-over-cms-menu #crm-menubar-toggle-position a i { | |
183 | transform: rotate(180deg); | |
184 | } | |
185 | ||
186 | @media (min-width: 768px) { | |
187 | ||
188 | /* Switch to desktop layout | |
189 | ----------------------------------------------- | |
190 | These transform the menu tree from | |
191 | collapsible to desktop (navbar + dropdowns) | |
192 | -----------------------------------------------*/ | |
193 | /* start... (it's not recommended editing these rules) */ | |
194 | #civicrm-menu ul{position:absolute;width:12em;} | |
195 | #civicrm-menu li{float:left;} | |
196 | #civicrm-menu.sm-rtl li{float:right;} | |
197 | #civicrm-menu ul li,#civicrm-menu.sm-rtl ul li,#civicrm-menu.sm-vertical li{float:none;} | |
198 | #civicrm-menu a{white-space:nowrap;} | |
199 | #civicrm-menu ul a,#civicrm-menu.sm-vertical a{white-space:normal;} | |
200 | #civicrm-menu .sm-nowrap > li > a,#civicrm-menu .sm-nowrap > li > :not(ul) a{white-space:nowrap;} | |
201 | /* ...end */ | |
202 | ||
203 | /* hide the button in desktop view */ | |
204 | #civicrm-menu-nav .crm-menubar-toggle-btn { | |
205 | position: absolute; | |
206 | top: -99999px; | |
207 | } | |
208 | ||
209 | #civicrm-menu { | |
210 | border-bottom: 1px solid #ccc; | |
211 | } | |
212 | ||
213 | body.crm-menubar-below-cms-menu > #civicrm-menu-nav #civicrm-menu { | |
214 | top: 30px; | |
215 | } | |
216 | ||
217 | #civicrm-menu ul { | |
218 | background-color: #fff; | |
219 | box-shadow: 0px 0px 2px 0 rgba(0,0,0,0.3); | |
220 | } | |
221 | ||
222 | #civicrm-menu > li > a { | |
223 | height: 40px; | |
224 | } | |
225 | ||
226 | #civicrm-menu > li > a.highlighted { | |
227 | z-index: 200000; | |
228 | } | |
229 | ||
230 | #civicrm-menu ul li a:focus, | |
231 | #civicrm-menu ul li a:hover, | |
232 | #civicrm-menu ul li a.highlighted { | |
233 | background-color: #f2f2f2; | |
234 | color: #222; | |
235 | } | |
236 | ||
237 | body.crm-menubar-over-cms-menu #civicrm-menu, | |
238 | body.crm-menubar-below-cms-menu #civicrm-menu { | |
239 | position: fixed; | |
240 | top: 0; | |
241 | } | |
242 | ||
243 | body.crm-menubar-over-cms-menu #civicrm-menu { | |
244 | z-index: 99999; | |
245 | } | |
246 | ||
247 | body.crm-menubar-hidden #civicrm-menu { | |
248 | display: none; | |
249 | } | |
250 | } | |
251 | ||
252 | @media (max-width: 768px) { | |
253 | /* hide the menu in mobile view */ | |
254 | #crm-menubar-state:not(:checked) ~ #civicrm-menu { | |
255 | display: none; | |
256 | } | |
257 | #civicrm-menu { | |
258 | z-index: 100000; | |
259 | background-color: #333; | |
260 | } | |
261 | #civicrm-menu ul { | |
262 | background-color: #444; | |
263 | } | |
264 | #civicrm-menu ul ul { | |
265 | background-color: #555; | |
266 | } | |
267 | #civicrm-menu ul ul ul { | |
268 | background-color: #666; | |
269 | } | |
270 | #civicrm-menu li { | |
271 | padding: 5px; | |
272 | } | |
273 | #civicrm-menu li a { | |
274 | text-align: center; | |
275 | font-size: 14px; | |
276 | color: #ddd; | |
277 | } | |
278 | #civicrm-menu li a:focus, | |
279 | #civicrm-menu li a:hover, | |
280 | #civicrm-menu li a.highlighted { | |
281 | background-color: #676767; | |
282 | color: #fff; | |
283 | } | |
284 | #civicrm-menu li .sub-arrow:before, | |
285 | #civicrm-menu li li .sub-arrow:before { | |
286 | content: "\f0da"; | |
287 | font-family: 'FontAwesome'; | |
288 | color: #bbb; | |
289 | float: none; | |
290 | margin-left: 10px; | |
291 | } | |
292 | #civicrm-menu li a.highlighted .sub-arrow:before { | |
293 | content: "\f0d7"; | |
294 | } | |
295 | #civicrm-menu-nav { | |
296 | position: fixed; | |
297 | background: transparent; | |
298 | pointer-events: none; | |
299 | top: 0; | |
300 | left: 0; | |
301 | height: 50px; | |
302 | width: 100%; | |
303 | z-index: 100000; | |
304 | } | |
305 | #civicrm-menu-nav > * { | |
306 | pointer-events: auto; | |
307 | } | |
308 | #civicrm-menu-nav .crm-menubar-toggle-btn { | |
309 | margin-left: 20px; | |
310 | z-index: 110000; | |
311 | margin-top: 10px; | |
312 | } | |
313 | #civicrm-menu-nav .crm-menubar-toggle-btn span.crm-menu-logo { | |
314 | display: block; | |
315 | position: absolute; | |
316 | left: 5px; | |
317 | width: 18px; | |
318 | height: 18px; | |
319 | background: url(../i/logo_lg.png) no-repeat; | |
320 | background-size: 18px; | |
321 | top: 6px; | |
322 | } | |
323 | #crm-qsearch { | |
324 | text-align: center; | |
325 | } | |
326 | #crm-qsearch .sub-arrow { | |
327 | display: none; | |
328 | } | |
329 | ||
330 | #civicrm-menu li[data-name="Hide Menu"] { | |
331 | display: none; | |
332 | } | |
333 | ||
334 | #crm-qsearch-input { | |
335 | width: 14em !important; | |
336 | } | |
337 | ||
338 | #crm-menubar-toggle-position { | |
339 | display: none; | |
340 | } | |
341 | ||
342 | /* Make sure we can click overlapped submenus in responsive mode */ | |
343 | #civicrm-menu li ul li { | |
344 | z-index: 110000; | |
345 | background-color: inherit; | |
346 | } | |
347 | } |