-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinput-styles.css
103 lines (75 loc) · 1.85 KB
/
input-styles.css
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
/**
* These CSS rules apply to all pages on the site
* These rules are for input/form elements
*
* Anthony Wilson
*/
/* Override button styles */
button {
color: inherit;
font-family: inherit;
/* For iOS */
border-radius: 0;
/* Prevent double-tap zoom */
touch-action: manipulation;
}
/* Set the colors of all input elements */
/*input {
}*/
input:hover {
background-color: var(--BG-Input-Hover);
}
input:focus {
background-color: var(--BG-Input-Focus);
}
/* Textbox placeholder opacity needs to be reset, due to the "all: unset" rule being applied to textboxes */
::placeholder {
color: var(--Text-Alt);
opacity: 0.5;
}
/* Style all textboxes */
input[type="text"] {
/* Clear all default textbox styles */
all: unset;
box-sizing: border-box;
padding-top: 1px;
padding-left: 10px;
font-family: inherit;
font-size: 24px;
text-align: left;
color: var(--Text-Input);
background-color: var(--BG-Input);
border: 2px solid var(--Border);
transition: color 250ms, background 250ms;
}
input[type="text"]:hover {
color: var(--Text-Input-Hover);
background-color: var(--BG-Input-Hover);
}
input[type="text"]:focus {
color: var(--Text-Input-Focus);
background-color: var(--BG-Input-Focus);
}
input[type="text"]:hover::placeholder {
color: var(--Text-Input-Hover);
}
input[type="text"]:focus::placeholder {
color: var(--Text-Input-Focus);
}
select {
/* For iOS */
border-radius: 0;
/*-webkit-appearance: none;*/ /* This removes the arrow too, which I don't want */
color: var(--Text-Input);
background-color: var(--BG-Input);
border: 2px solid var(--Border);
cursor: pointer;
}
select:hover {
color: var(--Text-Input-Hover);
background-color: var(--BG-Input-Hover);
}
select:focus {
color: var(--Text-Input-Focus);
background-color: var(--BG-Input-Focus);
}