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