-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy path_forms.scss
120 lines (101 loc) · 3 KB
/
_forms.scss
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
@use "../01-abstract/variables" as *;
@use "../02-tools/f-assign-inputs" as *;
@use "../02-tools/f-get-svg-url" as *;
@use "../02-tools/m-checkbox-custom" as *;
@use "../02-tools/m-not-acf" as *;
@use "../02-tools/m-radio-custom" as *;
@use "../02-tools/m-select-custom" as *;
@use "../05-components/btn";
@use "sass:color";
// All inputs variables
$text-inputs-list: 'input[type="color"]', 'input[type="date"]',
'input[type="datetime"]', 'input[type="datetime-local"]',
'input[type="email"]', 'input[type="month"]', 'input[type="number"]',
'input[type="password"]', 'input[type="search"]', 'input[type="tel"]',
'input[type="text"]', 'input[type="time"]', 'input[type="url"]',
'input[type="week"]', "input:not([type])", "textarea";
$all-text-inputs: assign-inputs($text-inputs-list);
// Not apply style to ACF fields
@include not-acf {
// Textarea
textarea {
resize: vertical;
}
#{$all-text-inputs},
textarea {
box-sizing: border-box;
width: 100%;
padding: 15px 25px;
font-family: $font-family-primary;
line-height: 1;
color: $color-text;
background: color.adjust($color-light, $lightness: -5%);
border: 1px solid $color-grey-500;
border-radius: 10px; //reset border radius for ios
transition: border-color .5s ease;
appearance: none;
&::placeholder {
color: color.adjust($color-text, $lightness: 50%);
}
&:hover {
border-color: color.adjust($color-grey-500, $lightness: -10%);
}
&:focus {
color: color.adjust($color-text, $lightness: -10%);
border-color: color.adjust($color-grey-500, $lightness: -20%);
}
}
// Label
label {
display: inline-block;
font-weight: 700;
}
// Custom select
select {
@include select-custom;
}
input[type="checkbox"],
input[type="radio"] {
@include checkbox-custom;
&:checked {
@include checkbox-custom-checked;
}
}
input[type="radio"] {
@include radio-custom(true);
}
/*
// For complianz plugin
*:not(.cmplz-banner-checkbox) > {
input[type="checkbox"],
input[type="radio"] {
@include checkbox-custom;
&:checked {
@include checkbox-custom-checked;
}
}
input[type="radio"] {
@include radio-custom(true);
}
}
*/
input[type="submit"] {
@extend %btn-block;
}
input[type="reset"] {
@extend %btn-block-outline;
}
input[type="search"] {
&::-webkit-search-cancel-button {
width: 16px;
height: 16px;
cursor: pointer;
background-image: get-svg-url("close", $color-dark);
background-repeat: no-repeat;
background-size: contain;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
}
}