Skip to content

Commit

Permalink
removed up/down arrows from datefield via css; scroll capability stil… (
Browse files Browse the repository at this point in the history
#296)

* removed up/down arrows from datefield via css; scroll capability still works

* upon review move code into a more logical file

* Fixed linter complains about vendor prefixes, single quotes, and a qualifying selector for the input element. Also added a number input to the TextField example for easy checking across browsers
  • Loading branch information
phiden authored Dec 14, 2018
1 parent a55e987 commit bc3a6ae
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/core/src/components/DateField/DateField.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Markup:
Style guide: components.date-field
*/

.ds-c-field--month,
.ds-c-field--day,
.ds-c-field--year {
Expand Down
6 changes: 6 additions & 0 deletions packages/core/src/components/TextField/TextField.example.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ ReactDOM.render(
name="single_example"
requirementLabel="Optional"
/>
<TextField
defaultValue="123"
label="Number field"
name="number_example"
type="number"
/>
<TextField label="Small size modifier" name="small_example" size="small" />
<TextField
label="Medium size modifier"
Expand Down
10 changes: 9 additions & 1 deletion packages/core/src/components/TextField/TextField.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Markup:
Style guide: components.text-field
*/

// input, textarea, select
.ds-c-field {
appearance: none;
border: $input-border-width solid $input-border-color;
Expand All @@ -63,6 +62,15 @@ Style guide: components.text-field
&:focus {
box-shadow: $focus-shadow;
}

&[type='number'] {
appearance: textfield;

&::-webkit-outer-spin-button, &::-webkit-inner-spin-button {
appearance: none;
margin: 0;
}
}
}

.ds-c-field--small {
Expand Down

0 comments on commit bc3a6ae

Please sign in to comment.