5
5
// --------------------------------------------------
6
6
7
7
$picker-ios-height : 260px !default ;
8
- $picker-ios-background-color : #cfd5da !default ;
8
+ $picker-ios-border-color : $list-ios-border-color !default ;
9
+ $picker-ios-background-color : $list-ios-background-color !default ;
9
10
10
11
$picker-ios-toolbar-height : 44px !default ;
11
- $picker-ios-toolbar-background-color : #f7f7f8 !default ;
12
+ $picker-ios-toolbar-background-color : $picker-ios-background-color !default ;
12
13
13
14
$picker-ios-button-height : $picker-ios-toolbar-height !default ;
14
- $picker-ios-button-text-color : color ( $colors -ios, primary ) !default ;
15
+ $picker-ios-button-text-color : $link -ios-color !default ;
15
16
$picker-ios-button-background-color : transparent !default ;
16
17
17
- $picker-ios-option-offset-y : 90px !default ;
18
- $picker-ios-option-font-size : 18px !default ;
19
- $picker-ios-option-line-height : 24px !default ;
18
+ $picker-ios-column-padding : 0 12px !default ;
19
+
20
+ $picker-ios-option-padding : 0 10px !default ;
21
+ $picker-ios-option-text-color : $list-ios-text-color !default ;
22
+ $picker-ios-option-font-size : 22px !default ;
23
+ $picker-ios-option-height : 42px !default ;
24
+ $picker-ios-option-offset-y : (($picker-ios-height - $picker-ios-toolbar-height ) / 2 ) - ($picker-ios-option-height / 2 ) - 10 !default ;
25
+
26
+ $picker-highlight-opacity : .8 !default ;
20
27
21
28
22
29
.picker-wrapper {
23
30
height : $picker-ios-height ;
24
31
25
- border-top : 1px solid #929499 ;
32
+ border-top : 1px solid $picker-ios-border-color ;
26
33
27
34
background : $picker-ios-background-color ;
28
35
}
29
36
30
- .hairlines .picker-wrapper {
31
- border-width : $hairlines-width ;
32
- }
33
-
34
37
.picker-toolbar {
35
38
display : flex ;
36
39
37
40
height : $picker-ios-toolbar-height ;
41
+
42
+ border-bottom : 1px solid $picker-ios-border-color ;
43
+
38
44
background : $picker-ios-toolbar-background-color ;
39
45
}
40
46
47
+ .hairlines .picker-wrapper ,
48
+ .hairlines .picker-toolbar {
49
+ border-width : $hairlines-width ;
50
+ }
51
+
41
52
.picker-toolbar-button {
42
53
flex : 1 ;
54
+
43
55
text-align : right ;
44
56
}
45
57
46
58
.picker-toolbar-cancel {
59
+ font-weight : normal ;
60
+
47
61
text-align : left ;
48
62
}
49
63
@@ -57,23 +71,85 @@ $picker-ios-option-line-height: 24px !default;
57
71
background : $picker-ios-button-background-color ;
58
72
}
59
73
60
- .picker-offset {
61
- transform : translateY ($picker-ios-option-offset-y );
74
+ .picker-columns {
75
+ height : $picker-ios-height - $picker-ios-toolbar-height ;
76
+
77
+ perspective : 1800px ;
62
78
}
63
79
64
- .picker-column {
65
- padding : 0 10px ;
80
+ .picker-col {
81
+ padding : $picker-ios-column-padding ;
82
+
83
+ transform-style : preserve-3d ;
66
84
}
67
85
68
86
.picker-prefix ,
69
87
.picker-suffix ,
70
- .picker-options {
71
- padding : 0 8px ;
88
+ .picker-opts {
89
+ top : $picker-ios-option-offset-y ;
90
+
72
91
font-size : $picker-ios-option-font-size ;
73
- line-height : $picker-ios-option-line-height ;
92
+ line-height : $picker-ios-option-height ;
93
+ color : $picker-ios-option-text-color ;
94
+
95
+ transform-style : preserve-3d ;
96
+
97
+ pointer-events : none ;
74
98
}
75
99
76
- .picker-prefix ,
77
- .picker-suffix {
78
- padding : 0
100
+ .picker-opt {
101
+ margin : 0 ;
102
+ padding : $picker-ios-option-padding ;
103
+
104
+ width : calc (100% - 24px );
105
+
106
+ font-size : $picker-ios-option-font-size ;
107
+ line-height : $picker-ios-option-height ;
108
+
109
+ background : transparent ;
110
+ transform-origin : center center ;
111
+ transform-style : preserve-3d ;
112
+ transition-timing-function : ease-out ;
113
+
114
+ backface-visibility : hidden ;
115
+
116
+ pointer-events : auto ;
117
+ }
118
+
119
+ .picker-above-highlight {
120
+ position : absolute ;
121
+ top : 0 ;
122
+ left : 0 ;
123
+ z-index : 10 ;
124
+ display : block ;
125
+
126
+ width : 100% ;
127
+ height : $picker-ios-option-offset-y + 4px ;
128
+
129
+ border-bottom : 1px solid $picker-ios-border-color ;
130
+
131
+ background : linear-gradient (to bottom ,
132
+ rgba ($picker-ios-background-color , 1 ) 20% ,
133
+ rgba ($picker-ios-background-color , .7 ) 100% );
134
+
135
+ transform : translate3d (0 , 0 , 90px );
136
+ }
137
+
138
+ .picker-below-highlight {
139
+ position : absolute ;
140
+ top : $picker-ios-option-offset-y + $picker-ios-option-height - 4 ;
141
+ left : 0 ;
142
+ z-index : 11 ;
143
+ display : block ;
144
+
145
+ width : 100% ;
146
+ height : $picker-ios-option-offset-y + $picker-ios-option-height ;
147
+
148
+ border-top : 1px solid $picker-ios-border-color ;
149
+
150
+ background : linear-gradient (to top ,
151
+ rgba ($picker-ios-background-color , 1 ) 30% ,
152
+ rgba ($picker-ios-background-color , .7 ) 100% );
153
+
154
+ transform : translate3d (0 , 0 , 90px );
79
155
}
0 commit comments