AI-native design editor. Open-source Figma alternative.
Move number input spinner hiding to global CSS
Danila Poyarkove4eebf2a8724
diff --git a/src/app.css b/src/app.cssindex d353b7385..13aa6bfd6 100644--- a/src/app.css+++ b/src/app.css@@ -28,3 +28,13 @@ body {user-select: none;-webkit-user-select: none;}++input[type="number"] {+ appearance: textfield;+ -moz-appearance: textfield;+}++input[type="number"]::-webkit-inner-spin-button,+input[type="number"]::-webkit-outer-spin-button {+ display: none;+}diff --git a/src/components/ColorPicker.vue b/src/components/ColorPicker.vueindex cdf8051af..f478d53c5 100644--- a/src/components/ColorPicker.vue+++ b/src/components/ColorPicker.vue@@ -180,7 +180,7 @@ const swatchColor = computed(() => {/><inputtype="number"- class="w-10 rounded border border-border bg-input px-1 py-0.5 text-right text-xs text-surface [appearance:textfield] [[&::-webkit-inner-spin-button]:hidden::-webkit-inner-spin-button]:hidden"+ class="w-10 rounded border border-border bg-input px-1 py-0.5 text-right text-xs text-surface":value="Math.round(alpha * 100)"min="0"max="100"diff --git a/src/components/FillPicker.vue b/src/components/FillPicker.vueindex 086a365bb..7d3a04024 100644--- a/src/components/FillPicker.vue+++ b/src/components/FillPicker.vue@@ -532,7 +532,7 @@ function stopSwatchColor(stop: GradientStop) {/><inputtype="number"- class="w-10 rounded border border-border bg-input px-1 py-0.5 text-right text-xs text-surface [appearance:textfield] [[&::-webkit-inner-spin-button]:hidden::-webkit-inner-spin-button]:hidden"+ class="w-10 rounded border border-border bg-input px-1 py-0.5 text-right text-xs text-surface":value="Math.round(alpha * 100)"min="0"max="100"diff --git a/src/components/ScrubInput.vue b/src/components/ScrubInput.vueindex ce35a6c51..d1196652f 100644--- a/src/components/ScrubInput.vue+++ b/src/components/ScrubInput.vue@@ -119,7 +119,7 @@ function onKeydown(e: KeyboardEvent) {v-if="editing"ref="inputRef"type="number"- class="min-w-0 flex-1 cursor-text border-none bg-transparent pr-1.5 font-[inherit] text-xs text-surface outline-none [appearance:textfield] [[&::-webkit-inner-spin-button]:hidden::-webkit-inner-spin-button]:hidden"+ class="min-w-0 flex-1 cursor-text border-none bg-transparent pr-1.5 font-[inherit] text-xs text-surface outline-none":value="displayValue":min="min === -Infinity ? undefined : min":max="max === Infinity ? undefined : max"diff --git a/src/components/properties/LayoutSection.vue b/src/components/properties/LayoutSection.vueindex 8ce0abbc4..282f4e321 100644--- a/src/components/properties/LayoutSection.vue+++ b/src/components/properties/LayoutSection.vue@@ -222,7 +222,7 @@ function setAlignment(primary: LayoutAlign, counter: LayoutCounterAlign) {<div v-for="side in ['paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft'] as const" :key="side"><inputtype="number"- class="w-full rounded border border-border bg-input px-1 py-0.5 text-center text-[11px] text-surface [appearance:textfield] [[&::-webkit-inner-spin-button]:hidden::-webkit-inner-spin-button]:hidden"+ class="w-full rounded border border-border bg-input px-1 py-0.5 text-center text-[11px] text-surface":value="node[side]"min="0"@change="updateProp(side, +($event.target as HTMLInputElement).value)"