Skip to content

Commit 9a1892b

Browse files
committed
fix: remove spinner buttons from number inputs in settings
- Hide increment/decrement buttons for cleaner UI - Removed browser native spinners and Strapi NumberInput spinners - Simplified CSS for number inputs - Better mobile and desktop experience
1 parent 52f7ea4 commit 9a1892b

File tree

1 file changed

+4
-52
lines changed

1 file changed

+4
-52
lines changed

admin/src/pages/SettingsPage.jsx

Lines changed: 4 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,13 @@ const InputWrapper = styled.div`
121121
}
122122
}
123123
124-
/* Number Input specific */
124+
/* Number Input specific - remove ALL spinners */
125125
input[type="number"] {
126126
width: 100% !important;
127127
min-height: 48px !important;
128128
font-size: 16px !important;
129129
130-
/* Remove spinner arrows on mobile for better UX */
130+
/* Remove native browser spinner arrows */
131131
-moz-appearance: textfield;
132132
133133
&::-webkit-outer-spin-button,
@@ -139,18 +139,6 @@ const InputWrapper = styled.div`
139139
@media (min-width: 768px) {
140140
min-height: 44px !important;
141141
font-size: 15px !important;
142-
143-
/* Show spinner arrows on desktop */
144-
-moz-appearance: auto;
145-
146-
&::-webkit-outer-spin-button,
147-
&::-webkit-inner-spin-button {
148-
-webkit-appearance: auto;
149-
width: 20px;
150-
height: 20px;
151-
margin: 0;
152-
cursor: pointer;
153-
}
154142
}
155143
}
156144
@@ -167,46 +155,10 @@ const InputWrapper = styled.div`
167155
}
168156
}
169157
170-
/* Strapi NumberInput Component - hide spinners on mobile */
158+
/* Strapi NumberInput Component - ALWAYS hide increment/decrement buttons */
171159
button[aria-label="Increment"],
172160
button[aria-label="Decrement"] {
173-
display: none;
174-
175-
@media (min-width: 768px) {
176-
display: flex;
177-
align-items: center;
178-
justify-content: center;
179-
min-width: 32px !important;
180-
width: 32px !important;
181-
height: 32px !important;
182-
padding: 0 !important;
183-
border: 1px solid #dcdce4 !important;
184-
background: #ffffff !important;
185-
border-radius: 4px !important;
186-
transition: all 0.2s ease !important;
187-
cursor: pointer !important;
188-
189-
&:hover {
190-
background: #f6f6f9 !important;
191-
border-color: #4945ff !important;
192-
193-
svg {
194-
fill: #4945ff !important;
195-
}
196-
}
197-
198-
&:active {
199-
background: #eaeaef !important;
200-
transform: scale(0.95);
201-
}
202-
203-
svg {
204-
width: 10px !important;
205-
height: 10px !important;
206-
fill: #8e8ea9 !important;
207-
transition: fill 0.2s ease !important;
208-
}
209-
}
161+
display: none !important;
210162
}
211163
212164
/* NumberInput Container - proper alignment */

0 commit comments

Comments
 (0)