forked from ionic-team/ionic-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinput.scss
More file actions
161 lines (112 loc) · 2.61 KB
/
input.scss
File metadata and controls
161 lines (112 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
@import "../../globals.core";
// Input/Textarea Wrapper
// --------------------------------------------------
ion-input,
ion-textarea {
position: relative;
display: block;
flex: 1;
width: 100%;
}
.item-input ion-input,
.item-input ion-textarea {
position: static;
}
// Textarea Within An Item
// --------------------------------------------------
.item.item-textarea {
align-items: stretch;
}
// Native Text Input
// --------------------------------------------------
.text-input {
@include placeholder();
display: inline-block;
flex: 1;
width: 92%;
width: calc(100% - 10px);
border: 0;
border-radius: 0;
background: transparent;
-webkit-appearance: none;
}
textarea.text-input {
display: block;
}
.text-input[disabled] {
opacity: .4;
}
input.text-input:-webkit-autofill {
background-color: transparent;
}
.platform-mobile textarea.text-input {
resize: none;
}
// Input Cover: Unfocused
// --------------------------------------------------
// The input cover is the div that actually receives the
// tap/click event when scroll assist is configured to true.
// This make it so the native input element is not clickable.
// This will only show when the scroll assist is configured
// otherwise the .input-cover will not be rendered at all
.input-cover {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
// Input Cover: Focused
// --------------------------------------------------
// When the input has focus, then the input cover should be hidden
.input-has-focus .input-cover {
display: none;
}
.input-has-focus {
pointer-events: none;
}
.input-has-focus input,
.input-has-focus textarea,
.input-has-focus a,
.input-has-focus button {
pointer-events: auto;
}
// Scroll Assist Input
// --------------------------------------------------
// This input is used to help the app handle
// Next and Previous input tabbing
[next-input] {
position: absolute;
bottom: 1px;
padding: 0;
width: 1px;
height: 1px;
border: 0;
background: transparent;
pointer-events: none;
}
// Clear Input Icon
// --------------------------------------------------
.text-input-clear-icon {
position: absolute;
top: 0;
display: none;
margin: 0;
padding: 0;
height: 100%;
background-repeat: no-repeat;
background-position: center;
}
.input-has-focus.input-has-value .text-input-clear-icon {
display: block;
}
// Cloned Input
// --------------------------------------------------
.text-input.cloned-input {
position: relative;
top: 0;
pointer-events: none;
}
.item-input:not(.item-label-floating) .text-input.cloned-active {
display: none;
}