Toolbar: Search item consistency for focus state and IE8.

props afercia.
fixes #31322.


git-svn-id: https://develop.svn.wordpress.org/trunk@32074 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Helen Hou-Sandi 2015-04-08 16:07:51 +00:00
parent 1ad6f40e53
commit 34ebf98f36
2 changed files with 35 additions and 6 deletions

View File

@ -282,7 +282,8 @@ html:lang(he-il) .rtl #wpadminbar * {
#wpadminbar li .ab-item:focus:before,
#wpadminbar li.hover .ab-icon:before,
#wpadminbar li.hover .ab-item:before,
#wpadminbar li:hover #adminbarsearch:before {
#wpadminbar li:hover #adminbarsearch:before,
#wpadminbar li #adminbarsearch.adminbar-focused:before {
color: #00b9eb;
}
@ -387,6 +388,10 @@ html:lang(he-il) .rtl #wpadminbar * {
min-width: 270px;
}
#wpadminbar.ie8 #wp-admin-bar-my-account.with-avatar .ab-item {
white-space: nowrap;
}
#wpadminbar #wp-admin-bar-user-actions > li {
margin-left: 16px;
margin-right: 16px;
@ -436,8 +441,8 @@ html:lang(he-il) .rtl #wpadminbar * {
font-size: 11px;
}
#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img {
width: 16px;
#wpadminbar #wp-admin-bar-my-account.with-avatar > a img {
width: auto;
height: 16px;
padding: 0;
border: 1px solid #82878c;
@ -449,6 +454,10 @@ html:lang(he-il) .rtl #wpadminbar * {
display: inline;
}
#wpadminbar.ie8 #wp-admin-bar-my-account.with-avatar > a img {
width: auto;
}
/**
* WP Logo
*/
@ -552,6 +561,10 @@ html:lang(he-il) .rtl #wpadminbar * {
/**
* Search
*/
#wpadminbar.ie8 #wp-admin-bar-search {
display: block;
min-width: 32px;
}
#wpadminbar #wp-admin-bar-search .ab-item {
padding: 0;
background: transparent;
@ -561,6 +574,7 @@ html:lang(he-il) .rtl #wpadminbar * {
position: relative;
height: 32px;
padding: 0 2px;
z-index: 1;
}
#wpadminbar #adminbarsearch:before {
@ -581,6 +595,7 @@ html:lang(he-il) .rtl #wpadminbar * {
font: 13px/24px "Open Sans", sans-serif;
height: 24px;
width: 24px;
max-width: none;
padding: 0 3px 0 24px;
margin: 0;
color: #ccc;
@ -616,12 +631,18 @@ html:lang(he-il) .rtl #wpadminbar * {
}
#wpadminbar.ie8 > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input {
margin-top: 4px;
background-color: #464646;
/* IE8 z-index bug with transparent / empty elements - fill in with an encoded transparent GIF */
background: transparent 0 0 repeat scroll url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
}
/* IE8 doesn't redraw the pseudo elements unless you make a change to the content */
#wpadminbar.ie8 #adminbarsearch.adminbar-focused:before {
content: '\f179 '; /* extra space */
}
#wpadminbar.ie8 > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus {
background-color: #fff;
background: #fff;
z-index: -1;
}
#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder {

View File

@ -149,6 +149,14 @@ if ( typeof(jQuery) != 'undefined' ) {
}
});
$( '#adminbar-search' ).on({
focus: function() {
$( '#adminbarsearch' ).addClass( 'adminbar-focused' );
}, blur: function() {
$( '#adminbarsearch' ).removeClass( 'adminbar-focused' );
}
} );
// Empty sessionStorage on logging out
if ( 'sessionStorage' in window ) {
$('#wp-admin-bar-logout a').click( function() {