Proportional resizing with CSS variables
.icon {
--size: 32px;
width: var(--size);
height: var(--size);
}
Aspect ratio = width / height Aspect ratio = 186 / 79 = 2.35
.rect {
--size: 186px;
--aspect-ratio: 2.35;
width: var(--size);
height: calc(var(--size) / var(--aspect-ratio));
}