From 0245d9349735a9baae5b3ab693a2e91f187b4f35 Mon Sep 17 00:00:00 2001 From: VolandSZ <{E-MAIL}> Date: Sat, 20 Jun 2026 12:07:51 +0300 Subject: [PATCH] Fix SVG scale issue --- index.html | 2 +- src/App.vue | 5 ++++- src/styles.css | 40 +++++++++++++++++++++++++++++++++------- 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index b8982d2..d7b8237 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - Программа мамы + NVK&SNZ
diff --git a/src/App.vue b/src/App.vue index d10fac6..ae511e1 100644 --- a/src/App.vue +++ b/src/App.vue @@ -60,6 +60,7 @@ const createResultRow = (label, value) => { value: steps.join(' → '), image: digitImages[`../${finalDigit}.svg`], imageAlt: `Цифра ${finalDigit}`, + imageClass: `digit-icon--${finalDigit}`, }; }; @@ -155,7 +156,9 @@ const reset = () => { {{ row.value }} - + + + diff --git a/src/styles.css b/src/styles.css index 2285e46..eec03c0 100644 --- a/src/styles.css +++ b/src/styles.css @@ -132,13 +132,39 @@ h1 { gap: 10px; } -.digit-icon { - width: 58px; - height: 58px; - object-fit: contain; +.digit-icon-frame { + width: 1.2em; + height: 1.2em; + display: inline-flex; + align-items: center; + justify-content: center; flex: 0 0 auto; } +.digit-icon { + width: 100%; + height: 100%; + object-fit: contain; + transform: scale(var(--digit-scale, 1.06)); + transform-origin: center; +} + +.digit-icon--6 { + --digit-scale: 0.75; +} + +.digit-icon--7 { + --digit-scale: 0.75; +} + +.digit-icon--8 { + --digit-scale: 0.75; +} + +.digit-icon--9 { + --digit-scale: 0.75; +} + .result-button { justify-self: center; width: min(525px, 100%); @@ -194,8 +220,8 @@ h1 { font-size: 26px; } - .digit-icon { - width: 48px; - height: 48px; + .digit-icon-frame { + width: 1.18em; + height: 1.18em; } }