The discussion revolves around modifying the category image heights in a Discourse theme. helmi initially asks about changing the --max-height variable in a specific SCSS code snippet. Johani responds with a solution to modify the logo sizes globally, but notes that it may require additional adjustments depending on the desktop_category_page_style site setting.
However, jimkleiber encounters an issue where changing the --max-height variable doesn’t affect the image size. After investigation, jimkleiber discovers that the --aspect-ratio value is not being set and that the height is being overridden by a separate CSS rule in the category-header-widget. To resolve the issue, jimkleiber overrides the max-height value in their theme, successfully changing the image size.
I’m not sure what you’re trying to achieve, but if you just want to make the logo bigger / smaller then here’s something to get you started.
The category logo is used in a couple of places by default - on the categories page and on specific category pages.
If you want to modify the logo sizes in both those locations, you can use this
@supports (--custom: property) {
.category-logo.aspect-image {
--max-height: 200px; // change 200 to the desired height
}
}
Once you change the--max-height variable, the width should adjust automatically.
If you want to something more specific, like changing the logo sizes on the categories page only, then please check the desktop_category_page_style site setting on your site and let me know what it’s set to.
If you want the change to only occur on desktop, then add the CSS above to the desktop CSS tab of your theme. If you want it to only occur on mobile then add it to the mobile CSS tab. If you want it to occur on both mobile and desktop, then add it to the common CSS tab.
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?