From d5ff37c67d9002cda3552d678d0d46054da972e4 Mon Sep 17 00:00:00 2001 From: camilovegag Date: Fri, 24 May 2024 12:15:38 +0100 Subject: [PATCH] Hide spinner at hover --- .../berlin/src/components/input/Input.styled.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/berlin/src/components/input/Input.styled.tsx b/packages/berlin/src/components/input/Input.styled.tsx index 9275c181..f016a0b1 100644 --- a/packages/berlin/src/components/input/Input.styled.tsx +++ b/packages/berlin/src/components/input/Input.styled.tsx @@ -12,14 +12,17 @@ export const StyledInput = styled.input` color: var(--color-gray); } - input::-webkit-outer-spin-button, - input::-webkit-inner-spin-button { + input[type='number']::-webkit-outer-spin-button, + input[type='number']::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } - input[type='number'] { - -moz-appearance: textfield; /* Firefox */ - appearance: textfield; /* Standard property */ + -moz-appearance: textfield; + } + + input[type='number']:hover, + input[type='number']:focus { + -moz-appearance: textfield; } `;