Ticket #28599: focus admin menu arrow alt.patch
File focus admin menu arrow alt.patch, 7.3 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.opensub > a:focus:after, 463 #adminmenu li.wp-has-submenu.wp-not-current-submenu:after { 448 464 right: 0; 449 465 border: solid transparent; 450 466 content: " "; … … 457 473 z-index: 10000; 458 474 } 459 475 460 .folded ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after { 476 #adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub > a:focus:after { 477 right: 1px; 478 border-right-color: #fff; 479 } 480 481 .folded #adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub > a:focus:after, 482 .folded ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:after { 461 483 border-width: 4px; 462 484 margin-top: -4px; 463 485 top: 18px; 464 486 } 465 487 466 #adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub: hover:after {488 #adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:after { 467 489 border-right-color: #333; 468 490 } 469 491 … … 515 537 z-index: 26; 516 538 } 517 539 540 #adminmenu .wp-submenu .awaiting-mod, 541 #adminmenu .wp-submenu .update-plugins { 542 margin: 0 0 -2px 2px; 543 } 544 518 545 #adminmenu li .awaiting-mod span, 519 546 #adminmenu li span.update-plugins span, 520 547 #sidemenu li a span.update-plugins span { … … 522 549 padding: 0 6px; 523 550 } 524 551 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 552 #adminmenu li span.count-0, 532 553 #sidemenu li a .count-0 { 533 554 display: none; … … 538 559 line-height: 34px; 539 560 margin-top: 10px; 540 561 color: #aaa; 541 -webkit-transition: all .1s ease-in-out;542 transition: all .1s ease-in-out;543 562 } 544 563 545 #collapse-menu:hover,546 #collapse-menu:hover #collapse-button div:after {547 color: #2ea2cc;548 }549 550 564 .folded #collapse-menu span { 551 565 display: none; 552 566 } … … 584 598 position: relative; 585 599 text-align: center; 586 600 width: 20px; 587 -webkit-transition: all .1s ease-in-out;588 transition: all .1s ease-in-out;589 601 -webkit-font-smoothing: antialiased; 590 602 -moz-osx-font-smoothing: grayscale; 591 603 } … … 626 638 } 627 639 628 640 .auto-fold #adminmenu .wp-submenu.sub-open, 629 .auto-fold #adminmenu .opensub .wp-submenu,641 .auto-fold #adminmenu li.opensub .wp-submenu, 630 642 .auto-fold #adminmenu .wp-has-current-submenu .wp-submenu.sub-open, 631 .auto-fold #adminmenu .wp-has-current-submenu.opensub .wp-submenu,643 .auto-fold #adminmenu li.wp-has-current-submenu.opensub .wp-submenu, 632 644 .auto-fold #adminmenu a.menu-top:focus + .wp-submenu, 633 645 .auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus + .wp-submenu { 634 646 top: 0px; … … 639 651 .auto-fold #adminmenu .wp-has-current-submenu .wp-submenu { 640 652 position: absolute; 641 653 top: -1000em; 642 margin-right: -1px;643 654 padding: 7px 0 8px; 644 655 z-index: 9999; 645 656 } … … 804 815 position: relative; 805 816 display: block; 806 817 top: 0; 807 left: -1px;818 left: 0; 808 819 -webkit-box-shadow: none; 809 820 box-shadow: none; 810 821 } … … 814 825 display: none; 815 826 } 816 827 817 .auto-fold #adminmenu .opensub .wp-submenu {828 .auto-fold #adminmenu li.opensub .wp-submenu { 818 829 display: none; 819 830 } 820 831 … … 829 840 .auto-fold #adminmenu a.menu-top:focus + .wp-submenu, 830 841 .auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus + .wp-submenu { 831 842 position: relative; 832 left: -1px;843 left: 0; 833 844 right: 0; 834 845 top: 0; 835 846 } … … 861 872 border: 1px solid transparent; 862 873 background: none; 863 874 height: 44px; 864 margin-left: -1px;865 875 } 866 876 867 877 .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 }