File tree Expand file tree Collapse file tree 1 file changed +25
-3
lines changed
packages/components/src/number-field Expand file tree Collapse file tree 1 file changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,14 @@ import {
7
7
FoundationElementTemplate ,
8
8
NumberFieldOptions
9
9
} from '@microsoft/fast-foundation' ;
10
- import { neutralForegroundRest } from '../design-tokens.js' ;
10
+ import {
11
+ density ,
12
+ designUnit ,
13
+ elementScale ,
14
+ neutralFillActive ,
15
+ neutralFillHover ,
16
+ neutralForegroundRest
17
+ } from '../design-tokens.js' ;
11
18
import { BaseFieldStyles } from '../styles/index.js' ;
12
19
13
20
/**
@@ -22,20 +29,35 @@ export const numberFieldStyles: FoundationElementTemplate<
22
29
23
30
.controls {
24
31
opacity : 0 ;
32
+ margin : auto 0 ;
25
33
}
26
34
27
35
.step-up-glyph ,
28
36
.step-down-glyph {
29
37
display : block;
30
- padding : 4px 10px ;
38
+ padding : calc (
39
+ (${ designUnit } + 0.5 * ${ density } + 0.5 * ${ elementScale } ) * 1px
40
+ )
41
+ calc ((2 + 2 * ${ designUnit } + ${ density } + ${ elementScale } ) * 1px );
31
42
cursor : pointer;
32
43
}
33
44
34
45
.step-up-glyph : before ,
35
46
.step-down-glyph : before {
36
47
content : '' ;
37
48
display : block;
38
- border : solid transparent 6px ;
49
+ border : solid transparent
50
+ calc ((2 + ${ designUnit } + 0.5 * ${ density } + 0.5 * ${ elementScale } ) * 1px );
51
+ }
52
+
53
+ .step-up-glyph : hover : before ,
54
+ .step-down-glyph : hover : before {
55
+ background-color : ${ neutralFillHover } ;
56
+ }
57
+
58
+ .step-up-glyph : active : before ,
59
+ .step-down-glyph : active : before {
60
+ background-color : ${ neutralFillActive } ;
39
61
}
40
62
41
63
.step-up-glyph : before {
You can’t perform that action at this time.
0 commit comments