CSS, anyone? Can we reduce the font size used for names in user cards?

A screenshot will be helpful here for what I’m talking about. See:

Notice “Matthew Mill…”

While on the Discourse meta site, it looks like:

image

Maybe it’s because it’s gotta fit that badge in there because i’m a site admin here, but i think overall the font is just smaller? I suppose this is an artifact of selecting Montserrat instead of the default. I like the look overall and how it matches Fedora design standards, but… is there a way to override the scaling so the font face stays the same but is something like 80% of the default size, fitting in more letters?

If your name is tagged as a special <name>.</name> that should be easy.

Hi,

From browser inspection, there are available variables font size on font-variables.scss.

Then maybe it could be applied on file user-card.scss on line 80.

Should be work by adding new value like: font-size: var(----base-font-size-smallest) or other variables found on font-variables.scss.

Or just add font-size: 80% but this is I believe not a good practice.

1 Like

based on @oprizal answer,

Discourse META use → Arial

here we’re using → Montserrat

the best aproach will be:

h1.staff.full-name {

font-size: var(--base-font-size-larger);

}

Captura de pantalla de 2021-11-22 13-04-05

Regards.,

test in a dev environment:

#user-card .full-name {
   font-size: var(--base-font-size-larger);
}

Captura de pantalla de 2021-11-22 14-27-11

2 Likes

would you like to apply?

Regards.,

1 Like

What about one step larger than that? That seems to leave plenty of room for even names longer than mine?

let’s see this, I hope is better

#user-card .full-name {
   font-size: var(--font-up-2);
}

Captura de pantalla de 2021-11-22 18-55-06

Regards.,

2 Likes

Looks good — let’s do it!

Awesome! Thanks @hhlp!

Oh, and if you could do it over on Discussion too, that’d be lovely!

Sure, I will do it tomorrow

Regards.,

1 Like

Done fix it also on Discussion.fp.o

Regards.,

2 Likes