WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#19421 closed defect (bug) (fixed)

Admin bar avatar dimensions

Reported by: linuxologos Owned by: ryan
Milestone: 3.3 Priority: normal
Severity: normal Version: 3.3
Component: Toolbar Keywords: has-patch commit dev-reviewed
Focuses: Cc:

Description

Since [18683] the avatar is called as 28x28 (it used to be 16x16). It seems, that matches the total admin bar height. However it is forced to 16x16 through CSS

#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img {
    ...
    height: 16px;
    width: 16px;
    ...
}

I don't know if there's a reason for this inconsistency.

Say there is a reason. If avatar does get 28x28, adding the 1px border, it ends up as a 30x30 item, which overflows the height of the admin bar and seems a bit ugly.

Some plugins may use the value of size given in get_avatar() to pass inline styles. In such case, default CSS (16x16) is overridden and the problem is obvious.

If we really want the avatar to be a 16x16 img, get_avatar() should perhaps be given that exact value. If there's some reason and get_avatar() should be given a greater value, then the maximum should possibly be a 26x26 (let 2 px for top+bottom borders).

Attachments (1)

19421.patch (488 bytes) - added by linuxologos 10 years ago.

Download all attachments as: .zip

Change History (7)

@linuxologos
10 years ago

#1 @nacin
10 years ago

  • Milestone changed from Awaiting Review to 3.3

#2 @nacin
10 years ago

  • Keywords has-patch commit added

Good to me. koopersmith?

#3 @koopersmith
10 years ago

Works beautifully. Good to go.

#4 @ryan
10 years ago

Looks good.

#5 @nacin
10 years ago

  • Keywords dev-reviewed added

#6 @ryan
10 years ago

  • Owner set to ryan
  • Resolution set to fixed
  • Status changed from new to closed

In [19549]:

Fetch 16x16 avatar, not 28x28. Props linuxologos. fixes #19421

Note: See TracTickets for help on using tickets.