Skip to content

AI-native design editor. Open-source Figma alternative.

Hide number input spinners in Firefox

Danila Poyarkovd43fac94ca48
diff --git a/src/components/ColorPicker.vue b/src/components/ColorPicker.vue
index 6e55d6304..cdf8051af 100644
--- a/src/components/ColorPicker.vue
+++ b/src/components/ColorPicker.vue
@@ -180,7 +180,7 @@ const swatchColor = computed(() => {
/>
<input
type="number"
- class="w-10 rounded border border-border bg-input px-1 py-0.5 text-right text-xs text-surface [&::-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 [appearance:textfield] [[&::-webkit-inner-spin-button]:hidden::-webkit-inner-spin-button]:hidden"
:value="Math.round(alpha * 100)"
min="0"
max="100"
diff --git a/src/components/FillPicker.vue b/src/components/FillPicker.vue
index 985599765..086a365bb 100644
--- a/src/components/FillPicker.vue
+++ b/src/components/FillPicker.vue
@@ -532,7 +532,7 @@ function stopSwatchColor(stop: GradientStop) {
/>
<input
type="number"
- class="w-10 rounded border border-border bg-input px-1 py-0.5 text-right text-xs text-surface [&::-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 [appearance:textfield] [[&::-webkit-inner-spin-button]:hidden::-webkit-inner-spin-button]:hidden"
:value="Math.round(alpha * 100)"
min="0"
max="100"
diff --git a/src/components/ScrubInput.vue b/src/components/ScrubInput.vue
index e4f9f5a84..ce35a6c51 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 [&::-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 [appearance:textfield] [[&::-webkit-inner-spin-button]:hidden::-webkit-inner-spin-button]:hidden"
: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.vue
index 3d02af283..8ce0abbc4 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">
<input
type="number"
- class="w-full rounded border border-border bg-input px-1 py-0.5 text-center text-[11px] text-surface [&::-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 [appearance:textfield] [[&::-webkit-inner-spin-button]:hidden::-webkit-inner-spin-button]:hidden"
:value="node[side]"
min="0"
@change="updateProp(side, +($event.target as HTMLInputElement).value)"