Skip to content

Commit

Permalink
fix(ui-number-input): increase specificity for numberinput's input st…
Browse files Browse the repository at this point in the history
…yles

Closes: INSTUI-3864
  • Loading branch information
HerrTopi committed Sep 21, 2023
1 parent 9d19fd0 commit e761082
Showing 1 changed file with 25 additions and 19 deletions.
44 changes: 25 additions & 19 deletions packages/ui-number-input/src/NumberInput/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,28 @@ const generateStyle = (
}
: {}

const inputStyle = {
all: 'initial',
textAlign: textAlign,
direction: 'inherit',
WebkitFontSmoothing: 'antialiased',
MozOsxFontSmoothing: 'grayscale',
appearance: 'none',
lineHeight: 1,
margin: '0',
flex: 1,
minWidth: '0.0625rem',
boxSizing: 'border-box',
fontFamily: 'inherit',
fontSize: 'inherit',
fontWeight: componentTheme.fontWeight,
color: componentTheme.color,
background: componentTheme.background,
padding: componentTheme.padding,
textyAlign: textAlign,
'&::placeholder': { color: componentTheme.placeholderColor }
}

return {
numberInput: {
label: 'numberInput'
Expand Down Expand Up @@ -152,25 +174,9 @@ const generateStyle = (
},
input: {
label: 'numberInput_input',
all: 'initial',
textAlign: textAlign,
direction: 'inherit',
WebkitFontSmoothing: 'antialiased',
MozOsxFontSmoothing: 'grayscale',
appearance: 'none',
lineHeight: 1,
margin: '0',
flex: 1,
minWidth: '0.0625rem',
boxSizing: 'border-box',
fontFamily: 'inherit',
fontSize: 'inherit',
fontWeight: componentTheme.fontWeight,
color: componentTheme.color,
background: componentTheme.background,
padding: componentTheme.padding,
textyAlign: textAlign,
'&::placeholder': { color: componentTheme.placeholderColor }
...inputStyle,
'&:is(input)[type]': inputStyle,
'&:-webkit-any(input)[type]': inputStyle
}
}
}
Expand Down

0 comments on commit e761082

Please sign in to comment.