-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.css
232 lines (200 loc) · 5.43 KB
/
main.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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
/* The main css styling to be used across the website.
This file is referenced by all other HTML files in the website. */
body {
/* Defining the colour palette and styling */
--color-primary: #c3aad1;
--color-primary-dark: #929fd1;
--color-primary-light: #e7c7d7;
--colour-secondary: #9ad3ca;
--colour-secondary-light: #d7eae4;
--color-error: #cc3333;
--color-success: #4bb544;
--border-radius: 25px;
/* Defining the main parameters of the website */
margin: 0;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
background: var(--color-primary);
background-image: url("./assets/images/background.png");
background-size: cover;
}
.container {
/* Styling for the form container */
width: 400px;
max-width: 400px;
margin: 1rem;
padding: 2rem;
box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
border-radius: var(--border-radius);
background: #ffffff;
}
.container,
.form__input,
.form__button {
/* Defining the fonts for the container, inputs and button */
font: 500 1rem 'Quicksand', sans-serif;
}
.form--hidden {
/* What to do when form--hidden parameter is given (Hide) */
display: none;
}
.form > *:first-child {
/* Positioning the topmost item within the form */
margin-top: 0;
}
.form > *:last-child {
/* Positioning the bottommost item within the form */
margin-bottom: 0;
}
.form__title {
/* Styling for the form__title class */
margin-bottom: 2rem;
text-align: center;
}
.form__message {
/* Styling for the form__message class */
padding-top: 15px;
text-align: center;
margin-bottom: 1rem;
}
.form__message--success {
/* Styling for the form__message--success parameter */
color: var(--color-success)
}
.form__message--error {
/* Styling for the form__message--error parameter */
color: var(--color-error)
}
.form__input-group {
/* Styling for the form__input-group class */
margin-bottom: 1rem;
}
.form__input {
/* Styling for the form__input class */
display: block;
width: 100%;
padding: 0.75rem;
box-sizing: border-box;
border-radius: var(--border-radius);
border: 1px solid #dddddd;
outline: none;
background: #eeeeee;
transition: background 0.2s, border-color 0.2s;
}
.form__input:focus {
/* Styling for the focus action of form__input class */
border-color: var(--color-primary);
background: #ffffff;
}
.form__input--error {
/* Styling for the form__input--error parameter */
color: var(--color-error);
border-color: var(--color-error);
}
.form__button {
/* Styling for the form__button class */
position: relative;
width: 100%;
padding: 1rem 2rem;
border: none;
border-radius: var(--border-radius);
outline: none;
cursor: pointer;
background: var(--color-primary);
}
.form__button:hover {
/* Styling for the hover action of form__button class */
background: var(--color-primary-dark);
}
.form__button:active {
/* Styling for the active action of form__button class */
transform: scale(0.98);
}
.form__button:disabled {
/* Styling for the disabled action of form__button class */
background: var(--color-primary-light);
cursor: auto;
}
.form__button--text {
/* Styling for the form__button--text parameter */
font-weight: bold;
font-size: 1.1rem;
color: #ffffff;
transition: all 0.2s;
}
.form__button--loading .form__button--text {
/* Styling for the form__button--loading and form__button--text parameters */
visibility: hidden;
opacity: 0;
}
.form__button--loading::after {
/* Styling for the after action of form__button--loading parameter */
content: "";
position: absolute;
width: 16px;
height: 16px;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
border: 4px solid transparent;
border-top-color: #ffffff;
border-radius: 50%;
animation: button-loading-spinner 1s ease infinite;
}
@keyframes button-loading-spinner {
/* Action for the button-loading-spinner call */
from {
transform: rotate(0turn);
}
to {
transform: rotate(1turn);
}
}
.form__text {
/* Styling for the form__text class */
text-align: center;
}
.form__link {
/* Styling for the form__link class */
color: var(--color-primary-dark);
text-decoration: none;
cursor: pointer;
}
.form__link:hover {
/* Styling for the hover action of form__link class */
text-decoration: underline;
}
.form__radio-group {
/* Styling for the form__radio-group class */
display: inline-flex;
overflow: hidden;
border-radius: 20px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
}
.form__radio--input {
/* Styling for the form__radio--input parameter */
display:none;
}
.form__radio--label {
/* Styling for the form__radio--label parameter */
padding: 10px 20px;
font-size: 14px;
font: 500 1rem 'Quicksand', sans-serif;
color: #ffffff;
background: var(--color-primary-light);
cursor: pointer;
transition: background 0.2s;
}
.form__radio--label:not(:last-of-type) {
/* Styling for the form__radio--label parameter when last-of-type flag is not set */
border-right: 1px solid var(--color-primary-dark);
}
.form__radio--input:checked + .form__radio--label {
/* Styling for the checked action of form__radio--input parameter and form__radio--label */
background: var(--color-primary);
}