Colored badge based on username


(Jonathan Hosein) #1

I’ve got this going based on permissions, but I cant figure out how to get it to work based on a specific username.

span.moderator i:after {
  content: "MOD";
  display: inline;
  background-color: #AA00AA;
  border-radius: 3px;
  font-size: 0.9em;
  font-weight: bold;
  font-style: normal;
  padding: 2px 4px;
  color: #fff;
  line-height:1;
  margin:0 0 0 5px;
}

I’d rather do this via CSS and avoid doing this via user groups.


(Sam) #2

I’m not sure if this is exactly what you’re going for, but this:

.names .username a[data-user-card="username"]:after {
    stuff
}

Would put your MOD label (in this case) right next to username's… username.