Number input spin box CSS code compiler to JSS

2020-05-06 23:08发布

问题:

I've got problem with converting CSS code for hiding spin box of number input for JSS. My question is how to appropriately convert this code that it will match JSS?

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
   -webkit-appearance: none;
    margin: 0; 
}
input[type=number] {
-moz-appearance:textfield; 
}

回答1:

input: {
    '&::-webkit-outer-spin-button, &::-webkit-inner-spin-button': {
      '-webkit-appearance': 'none',
      '-moz-appearance': 'none',
      'margin': 0
    },
    '&[type=number]': {
      '-webkit-appearance': 'textfield',
      '-moz-appearance': 'textfield'
    }
  }

This should work.