Ticket #28599: focus admin menu.patch
File focus admin menu.patch, 7.0 KB (added by , 10 years ago) |
---|
-
src/wp-admin/css/admin-menu.css
47 47 display: inline-block; 48 48 -webkit-font-smoothing: antialiased; 49 49 -moz-osx-font-smoothing: grayscale; 50 -webkit-transition: all .1s ease-in-out;51 transition: all .1s ease-in-out;52 50 } 53 51 54 52 .icon16.icon-dashboard:before { … … 162 160 display: block; 163 161 line-height: 18px; 164 162 padding: 2px 5px; 165 color: # eee;163 color: #ddd; 166 164 } 167 165 166 #adminmenu a, 167 #adminmenu .dashicons, .dashicons-before:before { 168 -webkit-transition-property: none; 169 transition-property: none; 170 } 171 168 172 #adminmenu .wp-submenu a { 169 173 color: #bbb; 170 174 } … … 175 179 } 176 180 177 181 #adminmenu a:hover, 178 #adminmenu li.menu-top >a:focus,182 #adminmenu a:focus, 179 183 #adminmenu .wp-submenu a:hover, 180 #adminmenu .wp-submenu a:focus { 181 color: #2ea2cc; 184 #adminmenu .wp-submenu a:focus, 185 #collapse-menu:hover, 186 #collapse-menu:hover #collapse-button div:after { 187 color: #fff; 188 background-color: #111; 182 189 } 183 190 191 #adminmenu a:focus { 192 color: #fff !important; 193 -webkit-box-shadow: inset 0 0 0 1px #fff; 194 box-shadow: inset 0 0 0 1px #fff; 195 } 196 197 /* no outline while being clicked */ 198 #adminmenu a:focus:active { 199 -webkit-box-shadow: none; 200 box-shadow: none; 201 } 202 184 203 #adminmenu li.menu-top { 185 204 border: none; 186 205 min-height: 34px; … … 245 264 z-index: 10000; 246 265 } 247 266 267 /* current */ 248 268 #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, 249 269 #adminmenu li.current a.menu-top, 250 270 .folded #adminmenu li.wp-has-current-submenu, … … 256 276 color: #fff; 257 277 } 258 278 279 /* current counters */ 280 #adminmenu li.current a .awaiting-mod, 281 #adminmenu li a.wp-has-current-submenu .update-plugins { 282 background-color: #2ea2cc; 283 color: #fff; 284 } 285 286 259 287 .folded #adminmenu .wp-submenu.sub-open, 260 288 .folded #adminmenu .opensub .wp-submenu, 261 289 .folded #adminmenu .wp-has-current-submenu .wp-submenu.sub-open, … … 299 327 .folded #adminmenu .wp-has-current-submenu li > a { 300 328 padding-right: 16px; 301 329 padding-left: 14px; 302 -webkit-transition: all .1s ease-in-out;303 transition: all .1s ease-in-out;304 330 } 305 331 306 332 #adminmenu .wp-has-current-submenu ul > li > a, … … 357 383 } 358 384 359 385 div.wp-menu-image:before { 360 color: # 999;386 color: #aaa; 361 387 padding: 7px 0; 362 -webkit-transition: all .1s ease-in-out;363 transition: all .1s ease-in-out;364 388 } 365 389 366 #adminmenu div.wp-menu-image:before { 367 color: #999; 390 #adminmenu li:hover .wp-menu-image:before, 391 #adminmenu .wp-has-current-submenu .wp-menu-image:before, 392 #adminmenu a:focus .wp-menu-image:before, 393 #adminmenu .opensub .wp-menu-image:before { 394 color: #eee; 368 395 } 369 396 370 #adminmenu li.wp-has-current-submenu:hover div.wp-menu-image:before,371 #adminmenu .wp-has-current-submenu div.wp-menu-image:before,372 #adminmenu .current div.wp-menu-image:before,373 #adminmenu a.wp-has-current-submenu:hover div.wp-menu-image:before,374 #adminmenu a.current:hover div.wp-menu-image:before {375 color: #fff;376 }377 378 #adminmenu li:hover div.wp-menu-image:before {379 color: #2ea2cc;380 }381 382 397 .folded #adminmenu div.wp-menu-image { 383 398 width: 35px; 384 399 height: 30px; … … 444 459 } 445 460 446 461 /* flyout menu arrow */ 447 #adminmenu li.wp-has-submenu.wp-not-current-submenu: hover:after {462 #adminmenu li.wp-has-submenu.wp-not-current-submenu:after { 448 463 right: 0; 449 464 border: solid transparent; 450 465 content: " "; … … 457 472 z-index: 10000; 458 473 } 459 474 460 .folded ul#adminmenu li.wp-has-submenu.wp-not-current-submenu: hover:after {475 .folded ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:after { 461 476 border-width: 4px; 462 477 margin-top: -4px; 463 478 top: 18px; 464 479 } 465 480 466 #adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub: hover:after {481 #adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:after { 467 482 border-right-color: #333; 468 483 } 469 484 … … 515 530 z-index: 26; 516 531 } 517 532 533 #adminmenu .wp-submenu .awaiting-mod, 534 #adminmenu .wp-submenu .update-plugins { 535 margin: 0 0 -2px 2px; 536 } 537 518 538 #adminmenu li .awaiting-mod span, 519 539 #adminmenu li span.update-plugins span, 520 540 #sidemenu li a span.update-plugins span { … … 522 542 padding: 0 6px; 523 543 } 524 544 525 #adminmenu li.current a .awaiting-mod,526 #adminmenu li a.wp-has-current-submenu .update-plugins {527 background-color: #2ea2cc;528 color: #fff;529 }530 531 545 #adminmenu li span.count-0, 532 546 #sidemenu li a .count-0 { 533 547 display: none; … … 538 552 line-height: 34px; 539 553 margin-top: 10px; 540 554 color: #aaa; 541 -webkit-transition: all .1s ease-in-out;542 transition: all .1s ease-in-out;543 555 } 544 556 545 #collapse-menu:hover,546 #collapse-menu:hover #collapse-button div:after {547 color: #2ea2cc;548 }549 550 557 .folded #collapse-menu span { 551 558 display: none; 552 559 } … … 584 591 position: relative; 585 592 text-align: center; 586 593 width: 20px; 587 -webkit-transition: all .1s ease-in-out;588 transition: all .1s ease-in-out;589 594 -webkit-font-smoothing: antialiased; 590 595 -moz-osx-font-smoothing: grayscale; 591 596 } … … 626 631 } 627 632 628 633 .auto-fold #adminmenu .wp-submenu.sub-open, 629 .auto-fold #adminmenu .opensub .wp-submenu,634 .auto-fold #adminmenu li.opensub .wp-submenu, 630 635 .auto-fold #adminmenu .wp-has-current-submenu .wp-submenu.sub-open, 631 .auto-fold #adminmenu .wp-has-current-submenu.opensub .wp-submenu,636 .auto-fold #adminmenu li.wp-has-current-submenu.opensub .wp-submenu, 632 637 .auto-fold #adminmenu a.menu-top:focus + .wp-submenu, 633 638 .auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus + .wp-submenu { 634 639 top: 0px; … … 639 644 .auto-fold #adminmenu .wp-has-current-submenu .wp-submenu { 640 645 position: absolute; 641 646 top: -1000em; 642 margin-right: -1px;643 647 padding: 7px 0 8px; 644 648 z-index: 9999; 645 649 } … … 804 808 position: relative; 805 809 display: block; 806 810 top: 0; 807 left: -1px;811 left: 0; 808 812 -webkit-box-shadow: none; 809 813 box-shadow: none; 810 814 } … … 814 818 display: none; 815 819 } 816 820 817 .auto-fold #adminmenu .opensub .wp-submenu {821 .auto-fold #adminmenu li.opensub .wp-submenu { 818 822 display: none; 819 823 } 820 824 … … 829 833 .auto-fold #adminmenu a.menu-top:focus + .wp-submenu, 830 834 .auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus + .wp-submenu { 831 835 position: relative; 832 left: -1px;836 left: 0; 833 837 right: 0; 834 838 top: 0; 835 839 } … … 861 865 border: 1px solid transparent; 862 866 background: none; 863 867 height: 44px; 864 margin-left: -1px;865 868 } 866 869 867 870 .wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a { -
src/wp-admin/js/common.js
342 342 interval: 90 343 343 }); 344 344 345 $adminmenu.on( 'focus.adminmenu', '.wp- submenu a', function( event ) {345 $adminmenu.on( 'focus.adminmenu', '.wp-has-submenu, .wp-submenu a', function( event ) { 346 346 if ( $adminmenu.data( 'wp-responsive' ) ) { 347 347 // The menu is in responsive mode, bail 348 348 return; … … 349 349 } 350 350 351 351 $( event.target ).closest( 'li.menu-top' ).addClass( 'opensub' ); 352 }).on( 'blur.adminmenu', '.wp- submenu a', function( event ) {352 }).on( 'blur.adminmenu', '.wp-has-submenu, .wp-submenu a', function( event ) { 353 353 if ( $adminmenu.data( 'wp-responsive' ) ) { 354 354 return; 355 355 }