-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.css
261 lines (222 loc) · 5.08 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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
/* Colours as CSS variables */
:root {
--main-background-colour: #ffffff;
--main-accent-colour: #c87e74;
--main-border-colour: #CCC;
--main-text-colour: #000000;
}
/* Remove body padding, otherwise bound calculations will be really hard */
body {
padding: 0;
margin: 0;
}
/**
* Add padding to the side of the main block, because we still
* need some spacing from the border of the screen for good user
* experience
**/
main {
/*padding-left: 0.5rem;*/
/*padding-right: 0.5rem;*/
box-sizing: border-box;
--main-padding-width: 1rem;
}
.article {
padding-left: 0.5rem;
padding-right: 0.5rem;
}
#start-button-writer-section {
padding-left: 0.5rem;
padding-right: 0.5rem;
}
/* Set the background and accent colour */
* {
background-color: var(--main-background-colour);
accent-color: var(--main-accent-colour);
font-family: 'Ubuntu', sans-serif;
}
a {
text-decoration: none;
color: var(--main-accent-colour);
}
/* Make the ul and footer to be contatiners for a horizontal list */
ul, footer {
list-style: none;
padding: 0;
margin: 0;
overflow: hidden;
}
/* Make the footer and all list items in unordered lists inline with left alignment */
ul li, footer {
float: left;
position: relative;
display: flex;
align-items: center;
}
/* Basically the styling for the text on the top bar */
ul li a {
display: block;
color: var(--main-accent-colour);
text-align: center;
padding: 0 24px 0 24px;
text-decoration: none;
font-size: 32px;
line-height: 1.5;
}
/**
* Divide the main page into 2 parts, 25% for the sidebar and 75% for the writer widget.
* This is only applies in landscape mode.
**/
#main-page {
display: grid;
gap: 0;
grid-template-columns: 25% 75%;
grid-auto-rows: 100%;
}
/**
* Settings for the SVG that will be used by the writer
*/
.character-prop {
border: 2px solid var(--main-border-colour);
margin: auto;
position: relative;
}
/* This may cause problems, check out main-page.js on top of the definition of the "getDrawElementHeight" function */
@media (orientation: portrait) {
#main-page {
display: block;
}
}
/* Define uniform styling for footer elements */
footer p, footer select {
padding: 0 0.33rem 0 0.33rem;
font-size: 18px;
color: var(--main-text-colour);
}
/* Make sure selects are border boxes */
select::before, select::after {
box-sizing: border-box;
}
/* Make the select members shrink to fit since they would take too much space */
select {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background-color: transparent;
border: 1px solid var(--main-accent-colour);
border-radius: 4px;
font-family: inherit;
font-size: inherit;
cursor: inherit;
line-height: inherit;
z-index: 1;
outline: none;
box-sizing: border-box;
padding: 2px 2px 2px 2px;
margin: 0 0 0 0;
max-width: max-content;
resize: horizontal;
}
/* IDK what this does but why not keep it */
select::-ms-expand {
display: none;
}
/* Make options flex-boxes */
option {
display: flex;
min-width: 0;
flex-direction: row;
border-color: red;
box-sizing: border-box;
}
/* Only display the right border on landscape since on portrait elements are not inline */
@media (orientation: landscape) {
#main-page-info-container {
border-right: 1px solid var(--main-border-colour);
}
#main-page-info-container div {
border-bottom: 1px solid var(--main-border-colour);
}
}
@media (orientation: portrait) {
#main-page-info-container {
float: left;
position: relative;
display: flex;
width: 100%;
padding: 0;
overflow: hidden;
margin-bottom: 0.5rem;
border-bottom: 1px solid var(--main-border-colour);
}
#main-page-info-container div {
max-width: 50%;
}
#phrase-info-widget {
border-right: 1px solid var(--main-border-colour);
}
}
#phrase-info-widget {
display: none;
}
/* Reduce margins for the text on the character info */
#main-page-info-container p, #main-page-info-container ol {
margin: 3px 0.5rem;
}
/* Style the hr element is stupid can confirm, why have an hr? because a border on the footer will break */
#main-page-hr {
padding: 0 0 0 0;
margin: 0 0 0 0;
border: 0;
border-top: 1px solid var(--main-border-colour);
background-color: var(--main-border-colour);
}
/* Add a border to make the user not think or be distracted by the titlebar */
header {
margin-top: 0.25rem;
border-bottom: 1px solid var(--main-border-colour);
}
#site-title {
color: var(--main-text-colour);
}
#coming-soon-header {
font-size: 3vw;
}
#coming-soon-text {
font-size: 1.5vw;
}
/* Make the 404 emoji take up more or less the whole page */
#err-404-emoji {
font-size: 18vw;
}
/* The generic centered class */
.centered {
text-align: center;
}
.vcentered {
margin: auto;
}
/* This is the button you use to start a session */
#start-button, #start-button-writer-section {
margin: auto;
}
.slide-right {
overflow: hidden;
width: 100%;
/*animation-delay: 0.1s;*/
}
.slide-right .slide-able {
-webkit-animation: 1.5s slide-right 0.25s forwards;
animation: 1.5s slide-right 0.25s forwards;
transform: translateX(-100%);
}
@-webkit-keyframes slide-right {
to {
transform: translateX(0);
}
}
@keyframes slide-right {
to {
transform: translateX(0);
}
}