Fix inconsistent SVG tile icon sizes - #1583
Merged
Merged
Conversation
SVG icons with explicit width/height attributes rendered tiny because max-width/max-height only caps intrinsic size and never scales up, while dimensionless SVGs defaulted large and were capped to 60px. Pin .app-icon to a fixed 60x60 box with object-fit: contain so every icon renders at a consistent size while preserving aspect ratio. Fixes #1582
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1582.
Problem
Mixing icon sources on the dashboard looked broken: SVGs that ship explicit
width/heightattributes rendered tiny, while icons without size attributes (e.g. Simple Icons) rendered large.The cause is
.app-iconusingmax-width/max-height: 60px.max-*only caps an image's intrinsic size and never scales it up, so an SVG declaringwidth="24"rendered at 24px, while a dimensionless SVG defaulted large and got capped to 60px.Fix
Pin
.app-iconto a fixed60px x 60pxbox withobject-fit: contain. The.app-icon-containerwas already a fixed 60x60, so every icon now renders at a consistent size regardless of whether the SVG declares its own dimensions, andobject-fit: containpreserves aspect ratio so non-square icons are not distorted.Updated both the SCSS source and the committed compiled CSS. No upscaling regression for the raster fallback (
heimdall-icon-small.pngis 250x250).