From b5b495d478b9f29f269c913e09c540d997a3b717 Mon Sep 17 00:00:00 2001 From: isUnknown Date: Tue, 24 Feb 2026 14:16:54 +0100 Subject: [PATCH] disable: comment out em/rem unit options, keep only px and mm for print Margins: px + mm only. Font sizes: px only. em/rem buttons are commented out, not deleted, for potential future use. Co-Authored-By: Claude Opus 4.6 --- src/components/ElementPopup.vue | 4 +-- src/components/PagePopup.vue | 16 ++++++------ src/components/editor/PageSettings.vue | 16 ++++++------ src/components/editor/TextSettings.vue | 36 +++++++++++++------------- src/composables/useCssSync.js | 4 +-- 5 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/components/ElementPopup.vue b/src/components/ElementPopup.vue index cd3eee9..7baae2b 100644 --- a/src/components/ElementPopup.vue +++ b/src/components/ElementPopup.vue @@ -60,7 +60,7 @@ > px - + --> diff --git a/src/components/PagePopup.vue b/src/components/PagePopup.vue index 293bdab..8c78480 100644 --- a/src/components/PagePopup.vue +++ b/src/components/PagePopup.vue @@ -50,14 +50,14 @@ > px - + --> @@ -91,14 +91,14 @@ > px - + --> @@ -132,14 +132,14 @@ > px - + --> @@ -173,14 +173,14 @@ > px - + --> diff --git a/src/components/editor/PageSettings.vue b/src/components/editor/PageSettings.vue index caefbc8..6a1c187 100644 --- a/src/components/editor/PageSettings.vue +++ b/src/components/editor/PageSettings.vue @@ -77,13 +77,13 @@ > px - + --> @@ -118,13 +118,13 @@ > px - + --> @@ -159,13 +159,13 @@ > px - + --> @@ -200,13 +200,13 @@ > px - + --> diff --git a/src/components/editor/TextSettings.vue b/src/components/editor/TextSettings.vue index 92d4775..8df45ab 100644 --- a/src/components/editor/TextSettings.vue +++ b/src/components/editor/TextSettings.vue @@ -38,7 +38,7 @@ px - + >rem --> @@ -159,11 +159,11 @@ :class="{ active: marginOuterDetailed.bottom.unit === 'px' }" @click="updateMarginOuterUnit('px')" >px - + >rem --> @@ -189,11 +189,11 @@ :class="{ active: marginOuterDetailed.left.unit === 'px' }" @click="updateMarginOuterUnit('px')" >px - + >rem --> @@ -219,11 +219,11 @@ :class="{ active: marginOuterDetailed.right.unit === 'px' }" @click="updateMarginOuterUnit('px')" >px - + >rem --> @@ -266,11 +266,11 @@ :class="{ active: marginInnerDetailed.top.unit === 'px' }" @click="updateMarginInnerUnit('px')" >px - + >rem --> @@ -296,11 +296,11 @@ :class="{ active: marginInnerDetailed.bottom.unit === 'px' }" @click="updateMarginInnerUnit('px')" >px - + >rem --> @@ -326,11 +326,11 @@ :class="{ active: marginInnerDetailed.left.unit === 'px' }" @click="updateMarginInnerUnit('px')" >px - + >rem --> @@ -356,11 +356,11 @@ :class="{ active: marginInnerDetailed.right.unit === 'px' }" @click="updateMarginInnerUnit('px')" >px - + >rem --> @@ -675,7 +675,7 @@ const syncFromStore = () => { const fontWeight = extractValue('p', 'font-weight'); if (fontWeight) weight.value = fontWeight; - const fontSizeVal = extractNumericValue('p', 'font-size', ['px', 'em', 'rem']); + const fontSizeVal = extractNumericValue('p', 'font-size', ['px']); // ['px', 'em', 'rem'] if (fontSizeVal) fontSize.value = fontSizeVal; // Margins diff --git a/src/composables/useCssSync.js b/src/composables/useCssSync.js index 3588635..9f0b584 100644 --- a/src/composables/useCssSync.js +++ b/src/composables/useCssSync.js @@ -18,7 +18,7 @@ export function useCssSync() { * Extract a numeric CSS value with unit * Returns { value: number, unit: string } or null */ - const extractNumericValue = (selector, property, allowedUnits = ['px', 'em', 'rem', 'mm']) => { + const extractNumericValue = (selector, property, allowedUnits = ['px', 'mm']) => { // ['px', 'em', 'rem', 'mm'] const block = store.extractBlock(selector); if (!block) return null; @@ -38,7 +38,7 @@ export function useCssSync() { * Extract margin/padding shorthand (handles 1 or 4 values) * Returns { simple: { value, unit } } or { detailed: { top, right, bottom, left } } */ - const extractSpacing = (selector, property, allowedUnits = ['mm', 'px', 'rem']) => { + const extractSpacing = (selector, property, allowedUnits = ['mm', 'px']) => { // ['mm', 'px', 'rem'] const block = store.extractBlock(selector); if (!block) return null;