forked from ionic-team/ionic-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinput.wp.scss
More file actions
126 lines (93 loc) · 4.49 KB
/
input.wp.scss
File metadata and controls
126 lines (93 loc) · 4.49 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
@import "../../themes/ionic.globals.wp";
// Windows Input
// --------------------------------------------------
$text-input-wp-background-color: $list-wp-background-color !default;
$text-input-wp-border-color: $input-wp-border-color !default;
$text-input-wp-border-width: 2px !default;
$text-input-wp-margin-top: $item-wp-padding-top !default;
$text-input-wp-margin-right: ($item-wp-padding-right / 2) !default;
$text-input-wp-margin-bottom: $item-wp-padding-bottom !default;
$text-input-wp-margin-left: ($item-wp-padding-left / 2) !default;
$text-input-wp-padding-vertical: 0 !default;
$text-input-wp-padding-horizontal: 8px !default;
$text-input-wp-line-height: 3rem !default;
$text-input-wp-input-clear-icon-width: 30px !default;
$text-input-wp-input-clear-icon-color: $input-wp-border-color !default;
$text-input-wp-input-clear-icon-svg: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><polygon fill='" + $text-input-wp-input-clear-icon-color + "' points='405,136.798 375.202,107 256,226.202 136.798,107 107,136.798 226.202,256 107,375.202 136.798,405 256,285.798 375.202,405 405,375.202 285.798,256'/></svg>" !default;
$text-input-wp-input-clear-icon-size: 22px !default;
$text-input-wp-show-focus-highlight: true !default;
$text-input-wp-show-valid-highlight: $text-input-wp-show-focus-highlight !default;
$text-input-wp-show-invalid-highlight: $text-input-wp-show-focus-highlight !default;
$text-input-wp-highlight-color: color($colors-wp, primary) !default;
$text-input-wp-highlight-color-valid: color($colors-wp, secondary) !default;
$text-input-wp-highlight-color-invalid: color($colors-wp, danger) !default;
// Windows Default Input
// --------------------------------------------------
.text-input-wp {
margin: $text-input-wp-margin-top $text-input-wp-margin-right $text-input-wp-margin-bottom $text-input-wp-margin-left;
padding: $text-input-wp-padding-vertical $text-input-wp-padding-horizontal;
width: calc(100% - #{$text-input-wp-margin-right} - #{$text-input-wp-margin-left});
border: $text-input-wp-border-width solid $text-input-wp-border-color;
line-height: $text-input-wp-line-height;
}
// Windows Inset Input
// --------------------------------------------------
.item-wp .inset-input {
margin: ($item-wp-padding-top / 2) $item-wp-padding-right ($item-wp-padding-bottom / 2) $item-wp-padding-left;
padding: ($item-wp-padding-top / 2) ($item-wp-padding-right / 2) ($item-wp-padding-bottom / 2) ($item-wp-padding-left / 2);
}
// Windows Highlighted Input
// --------------------------------------------------
// Show the focus highlight when the input has focus
@if ($text-input-wp-show-focus-highlight) {
.item-wp.item-input.input-has-focus .text-input {
border-color: $text-input-wp-highlight-color;
}
}
// Show the valid highlight when it has the .ng-valid class and a value
@if ($text-input-wp-show-valid-highlight) {
.item-wp.item-input.ng-valid.input-has-value:not(.input-has-focus) .text-input {
border-color: $text-input-wp-highlight-color-valid;
}
}
// Show the invalid highlight when it has the invalid class and has been touched
@if ($text-input-wp-show-invalid-highlight) {
.item-wp.item-input.ng-invalid.ng-touched:not(.input-has-focus) .text-input {
border-color: $text-input-wp-highlight-color-invalid;
}
}
// Windows Stacked & Floating Inputs
// --------------------------------------------------
.item-label-stacked .text-input-wp,
.item-label-floating .text-input-wp,
.item-label-stacked .select-wp,
.item-label-floating .select-wp {
margin-top: 8px;
margin-bottom: 8px;
margin-left: 0;
width: calc(100% - #{$text-input-wp-margin-right});
}
.item-label-floating .text-input-wp.cloned-input {
top: 32px;
}
.item-label-stacked .text-input-wp.cloned-input {
top: 27px;
}
.item-wp.item-label-stacked [item-right],
.item-wp.item-label-floating [item-right] {
align-self: flex-end;
}
// Windows Clear Input Icon
// --------------------------------------------------
.input-wp[clearInput] {
position: relative;
}
.input-wp[clearInput] .text-input {
padding-right: $text-input-wp-input-clear-icon-width;
}
.input-wp .text-input-clear-icon {
@include svg-background-image($text-input-wp-input-clear-icon-svg);
right: ($item-wp-padding-right / 2);
width: $text-input-wp-input-clear-icon-width;
background-size: $text-input-wp-input-clear-icon-size;
}