Category image heights / General understanding of theme variables

Hmm, I’ve tried to change the --max-height as you’ve suggested and while that part updates in the inspector, the image stays the same size.

I’ve noticed in the inspector that the --aspect-ratio value doesn’t seem to be set (there’s no clickable link in Chrome to the value) and I can’t figure out where it may be set. I’ve searched the Discourse GitHub code but still can’t find it.

Any idea how I can either find where the --aspect-ratio is being set or what value I should set for it?

Edit: found the problem, the height was being set by the Discourse Category Headers theme component

.category-header-widget .category-logo.aspect-image,
.category-header-widget .category-logo.aspect-image>img {
    float: left;
    margin: 0 0.5em 0.25em 0;
    max-height: 150px;
}

So I just overrode the max-height in my theme.

category-header-widget .category-logo.aspect-image,
.category-header-widget .category-logo.aspect-image>img  {
	max-height: 80px;
}

Edit #2: your suggestion did work for the category icons on the category page, so thank you!

3 Likes