Opened 6 years ago

Closed 6 years ago

#3855 closed defect (bug) (fixed)

Centering Meetup Organizer's badge

Reported by: nukaga's profile nukaga Owned by: coffee2code's profile coffee2code
Milestone: Priority: normal
Component: Profiles Keywords: needs-patch


The icon of the Meetup Organizer's badge is pointing to the right. I want to make it in the middle.

Attachments (1)

center.jpg (28.7 KB) - added by nukaga 6 years ago.

Download all attachments as: .zip

Change History (6)

6 years ago

#1 follow-up: @nukaga
6 years ago

This is solved by adding the following CSS.

    left: 0px;

#2 @dd32
6 years ago

  • Component changed from General to Profiles

The circle is a box-shadow/border around the dashicon character, using CSS therefor causes the circle to shift with it.

It looks like most of the badges are not 100% centered, which if that's the case should be fixed upstream in dashicons by centering them in the canvas or something I think?

#3 in reply to: ↑ 1 @kurokoroll
6 years ago

If it were me, I would do it like this.

div#item-header #user-badges li div.dashicons:before{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);

#4 @coffee2code
6 years ago

  • Owner set to coffee2code
  • Status changed from new to accepted

#5 @coffee2code
6 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

Fixed in [14546-dotorg].

A left: 1px style was being applied to the dashicons. I removed it by default, since most badges were better centered without it. I explicitly re-added the style to a handful of badge dashicons that need it: themes, plugins, design, support, and WordCamp organizer. Also, the hosting badge didn't need the 2px top style applied it.

Note: See TracTickets for help on using tickets.