Opened 14 years ago
Closed 13 years ago
#16667 closed defect (bug) (fixed)
Admin Bar CSS Override Bugs
Reported by: | JohnONolan | Owned by: | JohnONolan |
---|---|---|---|
Milestone: | 3.1.1 | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | UI | Keywords: | ui-feedback has-patch |
Focuses: | Cc: |
Description
In 3.1 we introduced a new admin bar. We reset almost all of the CSS properties for the admin bar to prevent themes and plugins from inadvertently affecting its appearance. This ticket is to gather all the properties which we missed out and are coming up as bugs.
Attachments (5)
Change History (30)
#2
@
14 years ago
Positioning problem in K2 theme http://cl.ly/25382W1o3q0z0k2G2v1M
#5
follow-up:
↓ 7
@
14 years ago
User/Site image needs fixed height/width defined in CSS - http://d.pr/kG34
#6
follow-up:
↓ 9
@
14 years ago
Workaround for oversized user/site image
add_action('admin_head', 'nav_bar_fix'); function nav_bar_fix() { echo ' <style type="text/css"> #wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar > a img {width:16px; height 16px;} </style> '; }
#7
in reply to:
↑ 5
;
follow-ups:
↓ 8
↓ 14
@
14 years ago
Replying to JohnONolan:
User/Site image needs fixed height/width defined in CSS - http://d.pr/kG34
We are using $avatar = get_avatar( get_current_user_id(), 16 )
in core, how can it be bigger then 16px?
#8
in reply to:
↑ 7
@
14 years ago
Replying to ocean90:
Replying to JohnONolan:
User/Site image needs fixed height/width defined in CSS - http://d.pr/kG34
We are using
$avatar = get_avatar( get_current_user_id(), 16 )
in core, how can it be bigger then 16px?
At least firefox prefers to show an img in its full size when it is bigger than the width and height attributes.
#9
in reply to:
↑ 6
@
14 years ago
Replying to JohnONolan:
Workaround for oversized user/site image
add_action('admin_head', 'nav_bar_fix'); function nav_bar_fix() { echo ' <style type="text/css"> #wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar > a img {width:16px; height 16px;} </style> '; }
This fix is only needed if you have replaced the default gravatar with your own image that's larger than 16 px. Also the fix above needs a small tweak to fix the avatar display on the front end also:
add_action('wp_head', 'nav_bar_fix'); add_action('admin_head', 'nav_bar_fix'); function nav_bar_fix() { echo '<style type="text/css"> #wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar > a img {width:16px; height 16px;} </style>'; }
#12
@
14 years ago
- Severity changed from normal to major
Should actually be Priority: High - Having problems with my Admin Bar CSS because of #16667!
#13
@
14 years ago
- Severity changed from major to normal
This really isn't major. The admin bar is opt-out, and a theme can also specify its own CSS.
#14
in reply to:
↑ 7
@
14 years ago
Replying to ocean90:
Replying to JohnONolan:
User/Site image needs fixed height/width defined in CSS - http://d.pr/kG34
We are using
$avatar = get_avatar( get_current_user_id(), 16 )
in core, how can it be bigger then 16px?
This is happening with buddypress installed. They use get_avatar filter to alter avatars.
#17
follow-up:
↓ 18
@
14 years ago
Note: Above 'admin-bar-my-account.diff' patch is for when the my-account menu includes an avatar, and a plugin has added an additional second level menu. Planning on using this technique in BuddyPress/bbPress (unless a better solution is out there.)
#18
in reply to:
↑ 17
@
14 years ago
Replying to johnjamesjacoby:
Patch looks good. I would even add another ul
in there in case a plugin adds another level of submenus:
#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar ul ul, #wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar ul ul ul { left: 0; }
BTW without support for IE6 that would have been a lot simpler, but we are on the front end so... :)
#19
follow-up:
↓ 22
@
14 years ago
While avatar > ul > ul
would not be enough to cover an additional level of submenus, ul ul
should be enough.
#22
in reply to:
↑ 19
@
14 years ago
Replying to nacin:
Agree, not sure why in my test it didn't show the first time.
#23
@
14 years ago
- Resolution set to fixed
- Status changed from new to closed
This looks good for 3.1.1, I don't see anything else unresolved here. New tickets can be opened for future releases as appropriate.
CSS3 Transitions breaking http://jackosborne.co.uk/articles/wordpress-admin-bar/