This repository has been archived by the owner on Dec 3, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.css
161 lines (149 loc) · 3.08 KB
/
index.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
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
/* elements */
html {
scroll-behavior: smooth;
}
body {
text-align: center;
background-color: #121212;
color: white;
font-family: 'Nunito', Helvetica, Arial, sans-serif;
font-size: 1.1rem;
line-height: 2.25rem;
width: 396px;
margin: auto;
margin-top: 1em;
max-width: 100vw;
}
header {
font-size: .9em;
margin-bottom: 1em;
}
input {
border: none;
outline: none
}
input:disabled + label {
cursor: not-allowed !important;
}
footer {
margin-top: 2em;
}
input:read-only {
cursor: default
}
/* utility classes */
.display-block {
display: block;
}
.display-flex {
display: flex;
}
.highlight-good {
background-color: green;
color: white
}
.highlight-bad {
background-color: red;
color: white;
}
.text-align-center {
text-align: center;
}
.margin-auto {
margin: auto
}
.display-inline-block {
display: inline-block;
}
.display-none {
display: none;
}
#description, footer > p {
max-width: 90vw;
margin: auto;
}
.card input {
display: block;
padding: .8em;
margin: .5em;
width: 130px;
margin-left: auto;
margin-right: auto;
}
#item-1-container {
margin-right: .5em;
}
#item-2-container {
margin-left: 0.5em;
}
#check-result {
border: 1px solid white;
}
#check-result > div {
height: 33px; background-color: white; width: 0%
}
/* switch field styling was taken from https://thestizmedia.com/radio-buttons-as-toggle-buttons-with-css/ */
.switch-field {
display: flex;
/* margin-bottom: 36px; */
overflow: hidden;
}
.switch-field input {
position: absolute !important;
clip: rect(0, 0, 0, 0);
height: 1px;
width: 1px;
border: 0;
overflow: hidden;
}
.switch-field label {
background-color: white;
color: rgba(0, 0, 0, 0.6);
font-size: 14px;
line-height: 1;
text-align: center;
padding: 8px 16px;
margin-right: -1px;
/* border: 1px solid rgba(0, 0, 0, 0.2); */
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);
transition: all 0.1s ease-in-out;
width: 53.36px; /* only because each switch field contains 2 inputs, we can ensure all switch fields are the same witch*/
}
.switch-field label:hover {
cursor: pointer;
}
.switch-field input:checked + label {
background-color: green;
color: white;
box-shadow: none;
}
.switch-field label:first-of-type {
border-radius: 4px 0 0 4px;
}
.switch-field label:last-of-type {
border-radius: 0 4px 4px 0;
}
@media only screen
and (min-device-width: 375px)
and (max-device-width: 667px)
and (-webkit-min-device-pixel-ratio: 2) {
.card input {
font-size: .9em;
}
}
@media only screen and (min-width: 920px) {
html, body {
height: 100%;
}
html {
display: table;
margin: auto;
}
body {
display: table-cell;
vertical-align: middle;
}
.card input {
width: 154px;
}
}