File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 43
43
}
44
44
}
45
45
46
+ // Optionally remove number input's spinner
47
+ .no-spinner .input {
48
+ & ::-webkit-inner-spin-button ,
49
+ & ::-webkit-outer-spin-button {
50
+ display : none ;
51
+ }
52
+
53
+ & [type = ' number' ] {
54
+ -moz-appearance : textfield;
55
+ }
56
+ }
57
+
46
58
:focus-within .input {
47
59
caret-color : var (--_focus-caret-color );
48
60
}
Original file line number Diff line number Diff line change @@ -226,6 +226,11 @@ export abstract class TextField extends textFieldBaseClass {
226
226
*/
227
227
@property ( { type : Number } ) minLength = - 1 ;
228
228
229
+ /**
230
+ * When true, hide the spinner for `type="number"` text fields.
231
+ */
232
+ @property ( { type : Boolean , attribute : 'no-spinner' } ) noSpinner = false ;
233
+
229
234
/**
230
235
* A regular expression that the text field's value must match to pass
231
236
* constraint validation.
@@ -514,6 +519,7 @@ export abstract class TextField extends textFieldBaseClass {
514
519
'disabled' : this . disabled ,
515
520
'error' : ! this . disabled && this . hasError ,
516
521
'textarea' : this . type === 'textarea' ,
522
+ 'no-spinner' : this . noSpinner ,
517
523
} ;
518
524
519
525
return html `
You can’t perform that action at this time.
0 commit comments