Repository navigation
Expand file tree
/
Copy pathforms.css
More file actions
98 lines (93 loc) · 3.06 KB
/
Copy pathforms.css
File metadata and controls
98 lines (93 loc) · 3.06 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
/* reset styles in common form elements */
:where([type="text"]),
:where([type="email"]),
:where([type="url"]),
:where([type="password"]),
:where([type="number"]),
:where([type="date"]),
:where([type="datetime"]),
:where([type="datetime-local"]),
:where([type="month"]),
:where([type="tel"]),
:where([type="time"]),
:where([type="week"]),
:where(select),
:where(textarea) {
appearance: none;
background-color: #fff;
border-color: currentColor;
border-width: 1px;
border-style: solid;
border-radius: 0;
font-size: 1rem;
line-height: 1.5;
padding: 0.5rem 0.75rem;
}
/* reset placeholder style in input and textare elements */
:where(input::placeholder),
:where(textarea::placeholder) {
color: currentColor;
opacity: 0.5;
}
/* reset checkbox and radio inputs */
:where([type="checkbox"]),
:where([type="radio"]) {
appearance: none;
background-origin: border-box;
border-color: currentColor;
border-style: solid;
border-width: 1px;
display: inline-block;
height: 1rem;
margin: 0;
padding: 0;
user-select: none;
vertical-align: middle;
width: 1rem;
}
:where([type="radio"]) {
border-radius: 999px;
}
/* reset checked and indeterminate states in checkbox and radio inputs */
:where([type="checkbox"]:checked),
:where([type="checkbox"]:indeterminate),
:where([type="radio"]:checked) {
background-color: currentColor;
background-position: center;
background-repeat: no-repeat;
background-size: 100% 100%;
border-color: transparent;
}
:where([type="checkbox"]:checked) {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' stroke='%23fff' d='M4,8l3,3l5,-6'/%3e%3c/svg%3e");
}
:where([type="checkbox"]:indeterminate) {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' stroke='%23fff' d='M4,8h8'/%3e%3c/svg%3e");
}
:where([type="radio"]:checked) {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3ccircle cx='8' cy='8' r='3' fill='%23fff'/%3e%3c/svg%3e");
}
/* reset range input element */
:where([type="range"]) {
border-radius: 1rem;
display: block;
margin: 0;
min-width: 0;
outline: none;
}
:where([type="range"]:-webkit-slider-thumb),
:where([type="range"]:-moz-range-thumb) {
background-color: currentColor;
border: none;
border-radius: 999px;
height: 1rem;
width: 1rem;
}
/* display a custom caret icon in select element */
:where(select) {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' stroke='%236c757d' d='M6,8l4,4l4,-4'/%3e%3c/svg%3e");
background-position: right 0.75rem center;
background-repeat: no-repeat;
background-size: 16px 12px;
padding-right: 2.5rem;
}