Skip to content
Snippets Groups Projects
Unverified Commit 00c73c87 authored by LitoMore's avatar LitoMore Committed by GitHub
Browse files

fix auto-sized logo sizes (#10764)

parent e6b66a88
Branches
Tags
No related merge requests found
......@@ -93,10 +93,13 @@ function getSimpleIcon({ name, color, style, size }) {
if (size === 'auto') {
const { width: iconWidth, height: iconHeight } = getIconSize(key)
if (iconWidth > iconHeight) {
if (iconWidth !== iconHeight) {
const path = resetIconPosition(simpleIcons[key].path)
iconSvg = iconSvg
.replace('viewBox="0 0 24 24"', `viewBox="0 0 24 ${iconHeight}"`)
.replace(
'viewBox="0 0 24 24"',
`viewBox="0 0 ${iconWidth} ${iconHeight}"`,
)
.replace(/<path d=".*"\/>/, `<path d="${path}"/>`)
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment