mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-18 04:25:07 +00:00
Admin bar styling improvements.
* Ensure there isn't a text shadow for update and comment counts. * Hide zero count of pending comments via PHP, not CSS. * Show the update title attribute across the entire menu item, props demetris. * Let the CSS breathe a little. git-svn-id: http://svn.automattic.com/wordpress/trunk@16791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
611f511e0f
commit
2be192c80e
@ -221,7 +221,8 @@ function wp_admin_bar_comments_menu() {
|
|||||||
$awaiting_mod = wp_count_comments();
|
$awaiting_mod = wp_count_comments();
|
||||||
$awaiting_mod = $awaiting_mod->moderated;
|
$awaiting_mod = $awaiting_mod->moderated;
|
||||||
|
|
||||||
$wp_admin_bar->add_menu( array( 'id' => 'comments', 'title' => sprintf( __('Comments %s'), "<span id='ab-awaiting-mod' class='count-$awaiting_mod'><span class='pending-count'>" . number_format_i18n($awaiting_mod) . "</span></span>" ), 'href' => admin_url('edit-comments.php') ) );
|
$awaiting_mod = $awaiting_mod ? "<span id='ab-awaiting-mod'><span class='pending-count>" . number_format_i18n( $awaiting_mod ) . "</span></span>" : '';
|
||||||
|
$wp_admin_bar->add_menu( array( 'id' => 'comments', 'title' => sprintf( __('Comments %s'), $awaiting_mod ), 'href' => admin_url('edit-comments.php') ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
function wp_admin_bar_appearance_menu() {
|
function wp_admin_bar_appearance_menu() {
|
||||||
@ -276,7 +277,9 @@ function wp_admin_bar_updates_menu() {
|
|||||||
|
|
||||||
$update_title = !empty($update_title) ? esc_attr(implode(', ', $update_title)) : '';
|
$update_title = !empty($update_title) ? esc_attr(implode(', ', $update_title)) : '';
|
||||||
|
|
||||||
$update_title = sprintf( __('Updates %s'), "<span id='ab-updates' class='count-$update_count' title='$update_title'><span class='update-count'>" . number_format_i18n($update_count) . "</span></span>" );
|
$update_title = "<span title='$update_title'>";
|
||||||
|
$update_title .= sprintf( __('Updates %s'), "<span id='ab-updates' class='update-count'>" . number_format_i18n($update_count) . '</span>' );
|
||||||
|
$update_title .= '</span>';
|
||||||
|
|
||||||
$href = is_multisite() ? network_admin_url( 'update-core.php' ) : admin_url( 'update-core.php' );
|
$href = is_multisite() ? network_admin_url( 'update-core.php' ) : admin_url( 'update-core.php' );
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,15 +1,15 @@
|
|||||||
#wpadminbar {
|
#wpadminbar {
|
||||||
direction:ltr;
|
direction: ltr;
|
||||||
background:#666 url(../images/admin-bar-sprite.png?d=08102010) 0 -222px repeat-x;
|
background: #666 url(../images/admin-bar-sprite.png?d=08102010) 0 -222px repeat-x;
|
||||||
color:#ddd;
|
color: #ddd;
|
||||||
font:12px Arial, Helvetica, sans-serif;
|
font: 12px Arial, Helvetica, sans-serif;
|
||||||
height:28px;
|
height: 28px;
|
||||||
left:0;
|
left: 0;
|
||||||
margin:0;
|
margin: 0;
|
||||||
position:fixed;
|
position: fixed;
|
||||||
top:0;
|
top: 0;
|
||||||
width:100%;
|
width: 100%;
|
||||||
z-index:99999;
|
z-index: 99999;
|
||||||
min-width: 960px;
|
min-width: 960px;
|
||||||
}
|
}
|
||||||
#wpadminbar ul,
|
#wpadminbar ul,
|
||||||
@ -37,39 +37,39 @@
|
|||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
#wpadminbar .avatar {
|
#wpadminbar .avatar {
|
||||||
border:1px solid #999 !important;
|
border: 1px solid #999 !important;
|
||||||
padding:0 !important;
|
padding: 0 !important;
|
||||||
margin:-3px 5px 0 0 !important;
|
margin: -3px 5px 0 0 !important;
|
||||||
vertical-align:middle;
|
vertical-align: middle;
|
||||||
float:none;
|
float: none;
|
||||||
display:inline !important;
|
display: inline !important;
|
||||||
}
|
}
|
||||||
#wpadminbar li:hover > ul,
|
#wpadminbar li:hover > ul,
|
||||||
#wpadminbar li.hover > ul {
|
#wpadminbar li.hover > ul {
|
||||||
display:block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
#wpadminbar .menupop li:hover > ul,
|
#wpadminbar .menupop li:hover > ul,
|
||||||
#wpadminbar .menupop li.hover > ul {
|
#wpadminbar .menupop li.hover > ul {
|
||||||
margin-left:100%;
|
margin-left: 100%;
|
||||||
margin-top:-28px;
|
margin-top: -28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#wpadminbar .menupop ul li a {
|
#wpadminbar .menupop ul li a {
|
||||||
color:#555 !important;
|
color: #555 !important;
|
||||||
text-shadow:none;
|
text-shadow: none;
|
||||||
font-weight:normal;
|
font-weight: normal;
|
||||||
white-space:nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
#wpadminbar .menupop a > span {
|
#wpadminbar .menupop a > span {
|
||||||
background:url(../images/admin-bar-sprite.png?d=08102010) 100% 100.4% no-repeat;
|
background: url(../images/admin-bar-sprite.png?d=08102010) 100% 100.4% no-repeat;
|
||||||
padding-right:.8em;
|
padding-right: .8em;
|
||||||
line-height: 28px;
|
line-height: 28px;
|
||||||
}
|
}
|
||||||
#wpadminbar .menupop ul li a > span {
|
#wpadminbar .menupop ul li a > span {
|
||||||
display: block;
|
display: block;
|
||||||
background:url(../images/admin-bar-sprite.png?d=08102010) 100% 97.2% no-repeat;
|
background: url(../images/admin-bar-sprite.png?d=08102010) 100% 97.2% no-repeat;
|
||||||
padding-right:1.5em;
|
padding-right: 1.5em;
|
||||||
line-height: 28px;
|
line-height: 28px;
|
||||||
}
|
}
|
||||||
#wpadminbar ul li a span#ab-awaiting-mod,
|
#wpadminbar ul li a span#ab-awaiting-mod,
|
||||||
@ -83,57 +83,52 @@
|
|||||||
-moz-border-radius: 5px;
|
-moz-border-radius: 5px;
|
||||||
-webkit-border-radius: 5px;
|
-webkit-border-radius: 5px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
text-shadow: none;
|
||||||
}
|
}
|
||||||
#wpadminbar ul li a:hover span#ab-awaiting-mod,
|
#wpadminbar ul li a:hover span#ab-awaiting-mod,
|
||||||
#wpadminbar ul li a:hover span#ab-updates {
|
#wpadminbar ul li a:hover span#ab-updates {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
color: #888;
|
color: #000;
|
||||||
}
|
|
||||||
#wpadminbar span.update-count {
|
|
||||||
text-shadow: none;
|
|
||||||
}
|
|
||||||
#wpadminbar ul li a span#ab-awaiting-mod.count-0 {
|
|
||||||
display: none;
|
|
||||||
}
|
}
|
||||||
#wpadminbar .menupop ul {
|
#wpadminbar .menupop ul {
|
||||||
-moz-box-shadow:0 4px 8px rgba(0,0,0,0.1);
|
-moz-box-shadow: 0 4px 8px rgba(0,0,0,0.1);
|
||||||
-webkit-box-shadow:0 4px 8px rgba(0,0,0,0.1);
|
-webkit-box-shadow: 0 4px 8px rgba(0,0,0,0.1);
|
||||||
background:#fff;
|
background: #fff;
|
||||||
display:none;
|
display: none;
|
||||||
position:absolute;
|
position: absolute;
|
||||||
border:1px solid #dfdfdf;
|
border: 1px solid #dfdfdf;
|
||||||
border-top:none !important;
|
border-top: none !important;
|
||||||
float:none;
|
float: none;
|
||||||
}
|
}
|
||||||
html>body #wpadminbar .menupop ul {
|
html>body #wpadminbar .menupop ul {
|
||||||
background:rgba(255,255,255,0.97);
|
background: rgba(255,255,255,0.97);
|
||||||
border-color:rgba(0,0,0,0.1);
|
border-color: rgba(0,0,0,0.1);
|
||||||
}
|
}
|
||||||
#wpadminbar .menupop li {
|
#wpadminbar .menupop li {
|
||||||
float:none;
|
float: none;
|
||||||
margin:0;
|
margin: 0;
|
||||||
padding:0;
|
padding: 0;
|
||||||
background-image:none;
|
background-image: none;
|
||||||
}
|
}
|
||||||
#wpadminbar .quicklinks a {
|
#wpadminbar .quicklinks a {
|
||||||
border:none;
|
border: none;
|
||||||
color:#ddd !important;
|
color: #ddd !important;
|
||||||
height:28px;
|
height: 28px;
|
||||||
text-shadow:#555 0px -1px 0px;
|
text-shadow: #555 0px -1px 0px;
|
||||||
display:block;
|
display: block;
|
||||||
font:13px Arial, Helvetica, sans-serif;
|
font: 13px Arial, Helvetica, sans-serif;
|
||||||
font-weight:normal;
|
font-weight: normal;
|
||||||
letter-spacing:normal;
|
letter-spacing: normal;
|
||||||
padding:0 0.85em;
|
padding: 0 0.85em;
|
||||||
line-height:28px;
|
line-height: 28px;
|
||||||
text-decoration:none !important;
|
text-decoration: none !important;
|
||||||
}
|
}
|
||||||
#wpadminbar .quicklinks li ul li a {
|
#wpadminbar .quicklinks li ul li a {
|
||||||
overflow:hidden;
|
overflow: hidden;
|
||||||
width:160px;
|
width: 160px;
|
||||||
}
|
}
|
||||||
#wpadminbar .quicklinks a:hover {
|
#wpadminbar .quicklinks a:hover {
|
||||||
text-shadow:#333 0px -1px 0px;
|
text-shadow: #333 0px -1px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#wpadminbar li.ab-sadmin {
|
#wpadminbar li.ab-sadmin {
|
||||||
@ -165,7 +160,7 @@ html>body #wpadminbar .menupop ul {
|
|||||||
padding-left: 1.75em;
|
padding-left: 1.75em;
|
||||||
}
|
}
|
||||||
#wpadminbar li.ab-sadmin ul li a > span {
|
#wpadminbar li.ab-sadmin ul li a > span {
|
||||||
background:url(../images/admin-bar-sprite.png?d=08102010) 0% 101.8% no-repeat;
|
background: url(../images/admin-bar-sprite.png?d=08102010) 0% 101.8% no-repeat;
|
||||||
padding-left: 1.25em;
|
padding-left: 1.25em;
|
||||||
margin-left: -1.25em;
|
margin-left: -1.25em;
|
||||||
line-height: 28px;
|
line-height: 28px;
|
||||||
@ -176,60 +171,58 @@ html>body #wpadminbar .menupop ul {
|
|||||||
background: #555 url(../images/admin-bar-sprite.png?d=08102010) 0 -282px repeat-x;
|
background: #555 url(../images/admin-bar-sprite.png?d=08102010) 0 -282px repeat-x;
|
||||||
}
|
}
|
||||||
#wpadminbar li li:hover {
|
#wpadminbar li li:hover {
|
||||||
color:#fff !important;
|
color: #fff !important;
|
||||||
background: #888 url(../images/admin-bar-sprite.png?d=08102010) 0 -222px repeat-x !important;
|
background: #888 url(../images/admin-bar-sprite.png?d=08102010) 0 -222px repeat-x !important;
|
||||||
text-shadow: #666 0px -1px 0px;
|
text-shadow: #666 0px -1px 0px;
|
||||||
}
|
}
|
||||||
#wpadminbar li li:hover > a {
|
#wpadminbar li li:hover > a {
|
||||||
color:#fff !important;
|
color: #fff !important;
|
||||||
}
|
}
|
||||||
.quicklinks ul {
|
.quicklinks ul {
|
||||||
list-style:none;
|
list-style: none;
|
||||||
margin:0;
|
margin: 0;
|
||||||
padding:0;
|
padding: 0;
|
||||||
text-align:left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
.quicklinks ul li {
|
.quicklinks ul li {
|
||||||
float:left;
|
float: left;
|
||||||
margin:0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#adminbarsearch {
|
#adminbarsearch {
|
||||||
float:right;
|
float: right;
|
||||||
}
|
|
||||||
#adminbarsearch {
|
|
||||||
height: 18px;
|
height: 18px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
#adminbarsearch * {
|
#adminbarsearch * {
|
||||||
color: #555;
|
color: #555;
|
||||||
font-size:12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
#adminbarsearch label,
|
#adminbarsearch label,
|
||||||
#adminbarsearch a {
|
#adminbarsearch a {
|
||||||
height: 28px;
|
height: 28px;
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
display:block;
|
display: block;
|
||||||
float:left;
|
float: left;
|
||||||
padding:3px 4px;
|
padding: 3px 4px;
|
||||||
text-shadow:0px -1px 0px #444;
|
text-shadow: 0px -1px 0px #444;
|
||||||
}
|
}
|
||||||
#adminbarsearch a {
|
#adminbarsearch a {
|
||||||
text-decoration:underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
#adminbarsearch a:hover {
|
#adminbarsearch a:hover {
|
||||||
color:#fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
#wpadminbar li.ab-me:hover,
|
#wpadminbar li.ab-me:hover,
|
||||||
#wpadminbar li.ab-blog:hover {
|
#wpadminbar li.ab-blog:hover {
|
||||||
background:none;
|
background: none;
|
||||||
}
|
}
|
||||||
#wpadminbar li.ab-me > a,
|
#wpadminbar li.ab-me > a,
|
||||||
#wpadminbar li.ab-blog > a {
|
#wpadminbar li.ab-blog > a {
|
||||||
line-height: 18px !important;
|
line-height: 18px !important;
|
||||||
border: none !important;
|
border: none !important;
|
||||||
background:url(../images/admin-bar-sprite.png?d=08102010) 100% 59.8% no-repeat;
|
background: url(../images/admin-bar-sprite.png?d=08102010) 100% 59.8% no-repeat;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
padding: 0 1.15em 0 0.7em;
|
padding: 0 1.15em 0 0.7em;
|
||||||
}
|
}
|
||||||
@ -256,62 +249,62 @@ html>body #wpadminbar .menupop ul {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#wpadminbar #adminbar-search {
|
#wpadminbar #adminbar-search {
|
||||||
line-height:normal !important;
|
line-height: normal !important;
|
||||||
width:140px !important;
|
width: 140px !important;
|
||||||
margin-top:0px !important;
|
margin-top: 0px !important;
|
||||||
}
|
}
|
||||||
.adminbar-input {
|
.adminbar-input {
|
||||||
display:block !important;
|
display: block !important;
|
||||||
float:left !important;
|
float: left !important;
|
||||||
font:12px Arial,Helvetica,sans-serif !important;
|
font: 12px Arial, Helvetica, sans-serif !important;
|
||||||
border:1px solid #626262 !important;
|
border: 1px solid #626262 !important;
|
||||||
padding:2px 3px !important;
|
padding: 2px 3px !important;
|
||||||
margin-right:3px !important;
|
margin-right: 3px !important;
|
||||||
background:#ddd url(../images/admin-bar-sprite.png?d=08102010) top left no-repeat !important;
|
background: #ddd url(../images/admin-bar-sprite.png?d=08102010) top left no-repeat !important;
|
||||||
-webkit-border-radius:0 !important;
|
-webkit-border-radius: 0 !important;
|
||||||
-khtml-border-radius:0 !important;
|
-khtml-border-radius: 0 !important;
|
||||||
-moz-border-radius:0 !important;
|
-moz-border-radius: 0 !important;
|
||||||
border-radius:0 !important;
|
border-radius: 0 !important;
|
||||||
outline:none;
|
outline: none;
|
||||||
text-shadow:0 1px 0 #fff;
|
text-shadow: 0 1px 0 #fff;
|
||||||
}
|
}
|
||||||
button.adminbar-button {
|
button.adminbar-button {
|
||||||
position:relative;
|
position: relative;
|
||||||
border:0;
|
border: 0;
|
||||||
cursor:pointer;
|
cursor: pointer;
|
||||||
overflow:visible;
|
overflow: visible;
|
||||||
margin:0 !important;
|
margin: 0 !important;
|
||||||
float:left;
|
float: left;
|
||||||
background:url(../images/admin-bar-sprite.png?d=08102010) right -107px no-repeat;
|
background: url(../images/admin-bar-sprite.png?d=08102010) right -107px no-repeat;
|
||||||
padding:0 14px 0 0;
|
padding: 0 14px 0 0;
|
||||||
text-align:center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
button.adminbar-button span {
|
button.adminbar-button span {
|
||||||
position:relative;
|
position: relative;
|
||||||
display:block;
|
display: block;
|
||||||
white-space:nowrap;
|
white-space: nowrap;
|
||||||
height:19px;
|
height: 19px;
|
||||||
background:url(../images/admin-bar-sprite.png?d=08102010) left -69px no-repeat;
|
background: url(../images/admin-bar-sprite.png?d=08102010) left -69px no-repeat;
|
||||||
padding:3px 0 0 14px;
|
padding: 3px 0 0 14px;
|
||||||
font:12px Arial,Helvetica,sans-serif !important;
|
font: 12px Arial, Helvetica, sans-serif !important;
|
||||||
font-weight:bold !important;
|
font-weight: bold !important;
|
||||||
color:#444 !important;
|
color: #444 !important;
|
||||||
text-shadow:0px 1px 0px #eee !important;
|
text-shadow: 0px 1px 0px #eee !important;
|
||||||
}
|
}
|
||||||
button.adminbar-button:active {
|
button.adminbar-button:active {
|
||||||
background-position:right -184px !important;
|
background-position: right -184px !important;
|
||||||
text-shadow:0px 1px 0px #eee !important;
|
text-shadow: 0px 1px 0px #eee !important;
|
||||||
}
|
}
|
||||||
button.adminbar-button:hover span {
|
button.adminbar-button:hover span {
|
||||||
color:#000 !important;
|
color: #000 !important;
|
||||||
}
|
}
|
||||||
button.adminbar-button:active span {
|
button.adminbar-button:active span {
|
||||||
background-position:left -146px !important;
|
background-position: left -146px !important;
|
||||||
}
|
}
|
||||||
button.adminbar-button::-moz-focus-inner {
|
button.adminbar-button::-moz-focus-inner {
|
||||||
border:none;
|
border: none;
|
||||||
}
|
}
|
||||||
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
@media screen and (-webkit-min-device-pixel-ratio: 0) {
|
||||||
button.adminbar-button span {
|
button.adminbar-button span {
|
||||||
margin-top: -1px;
|
margin-top: -1px;
|
||||||
}
|
}
|
||||||
@ -328,31 +321,31 @@ button.adminbar-button::-moz-focus-inner {
|
|||||||
* html #wpadminbar .myaccount a,
|
* html #wpadminbar .myaccount a,
|
||||||
* html .quicklinks a:hover,
|
* html .quicklinks a:hover,
|
||||||
* html #wpadminbar .menupop:hover {
|
* html #wpadminbar .menupop:hover {
|
||||||
background-image: none !important;
|
background-image: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
* html #wpadminbar {
|
* html #wpadminbar {
|
||||||
overflow:hidden;
|
overflow: hidden;
|
||||||
position:absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
* html #wpadminbar .quicklinks ul li a {
|
* html #wpadminbar .quicklinks ul li a {
|
||||||
float:left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
* html #adminbarsearch-wrap {
|
* html #adminbarsearch-wrap {
|
||||||
position:absolute;
|
position: absolute;
|
||||||
top:0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
* html #wpadminbar ul,
|
* html #wpadminbar ul,
|
||||||
* html #wpadminbar ul li {
|
* html #wpadminbar ul li {
|
||||||
zoom:1;
|
zoom: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
* html #wpadminbar .myaccount a {
|
* html #wpadminbar .myaccount a {
|
||||||
margin-left:0 !important;
|
margin-left: 0 !important;
|
||||||
padding-left:12px !important;
|
padding-left: 12px !important;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* End IE 6-targeted rules
|
* End IE 6-targeted rules
|
||||||
|
@ -516,7 +516,7 @@ function wp_default_styles( &$styles ) {
|
|||||||
$styles->add( 'jcrop', '/wp-includes/js/jcrop/jquery.Jcrop.css', array(), '0.9.8' );
|
$styles->add( 'jcrop', '/wp-includes/js/jcrop/jquery.Jcrop.css', array(), '0.9.8' );
|
||||||
$styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.1' );
|
$styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.1' );
|
||||||
$styles->add( 'nav-menu', "/wp-admin/css/nav-menu$suffix.css", array(), '20100907' );
|
$styles->add( 'nav-menu', "/wp-admin/css/nav-menu$suffix.css", array(), '20100907' );
|
||||||
$styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array(), '20101201' );
|
$styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array(), '20101208' );
|
||||||
$styles->add( 'wp-jquery-ui-dialog', "/wp-includes/css/jquery-ui-dialog$suffix.css", array(), '20101119' );
|
$styles->add( 'wp-jquery-ui-dialog', "/wp-includes/css/jquery-ui-dialog$suffix.css", array(), '20101119' );
|
||||||
$styles->add( 'wplink', "/wp-includes/js/tinymce/plugins/wplink/css/wplink$suffix.css", array(), '20101206' );
|
$styles->add( 'wplink', "/wp-includes/js/tinymce/plugins/wplink/css/wplink$suffix.css", array(), '20101206' );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user