-
Notifications
You must be signed in to change notification settings - Fork 0
/
Sboiler.css
594 lines (524 loc) · 13.8 KB
/
Sboiler.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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
/*
Sboiler - The pure CSS responsive website boilerplate
Copyright (c) 2019 Steven Mortensen
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
/*
TODO: Here is a list of features that need to be added. (Check https://getbootstrap.com/docs/4.1/components/ and https://materializecss.com/ for items that you can create using only CSS.)
- Responsive 12-column grid layout classes. (done as flex boxes instead of a css grid so that wrapping is normal)
- An inbetween size from 800 to 950 for the top menu bar
~ Div toggles (to allow the toggling of anything using checkboxes, radios (made into groups with < name="(same)">), etc.) (Just create visible-when-small/big classes and give the responsive code to it. Etc.)
- Figure out how to get the toggles to animate
- Test different uses, like a tabbed view, or an accordion list, modal pop-ups, pop-overs, etc.
~ Badges
- Buttons
- Colors and themes (Also, combined versions of the same (can also be applied to radio labels))
- solid
- clear+outline
- underlining link
- Cards (basically all of the kinds listed on bootstrap, but made much simpler) (DO WITH GRID LAYOUT)
- Carousel of divs (automatic, selectable)
- Dropdowns (probably similar to the div toggles but without an input that needs checked. Maybe an input on :active instead of :checked if necessary?)
- Forms (give certain inputs focus outlines)
- Text inputs (both single and multiline)
- Submit buttons
- Radios
- Checkboxes
- Other input types and styles (See Input Groups in bootstrap)
- Modal pop-ups
- Pop-overs
- Progress bars (and some with animation)
- Scroll position detection? (.div-wrap-h on :hover perhaps?)
- Tooltips (would work like pop-overs, but on :hover and with an animation delay)
For Tool Class ideas, see https://getbootstrap.com/docs/4.1/utilities/ and https://materializecss.com/
- Dropshadows
- Positions besides center (top, bottom, left, right, etc.)
-
*/
/*=========================*/
/*===UNIVERSAL VARIABLES===*/
/*=========================*/
/*These variables control the theming of the website, and can easily be replaced or edited*/
@import url('https://fonts.googleapis.com/css?family=Abril+Fatface|Cinzel:400,700,900|Open+Sans:300,400,400i,700,800|Roboto:300,400,400i,700,900&subset=greek,greek-ext,latin-ext');
:root {
--color-font-prime: #303030;
--color-font-prime-light: #EEEEEE;
--color-font-prime-dark: #303030;
--color-link-prime: #008b8b;
--color-link-hover-prime: #005b5b;
--color-link-click-prime: #6b0000;
--color-bg-main-prime: #FFFFFF;
--color-bg-main-second: #EEEEEE;
--color-main-prime: #438db4;
--color-main-hover: #367493;
--main-container-max-width: 1000px; /*I recommend greater than 800px and less than 1200px*/
--main-container-padding: 35px 35px;
--menu-link-padding: 13px;
--font-main: 'Open Sans';
--font-h1: 'Roboto'; /*WAS: Abril*/
--font-h2: 'Roboto';
--font-h3: 'Roboto';
--font-main-size: 18px;
--font-main-line-height: 1.5em;
--font-menu-size: 16px;
--font-abril: 'Abril';
--font-open-sans: 'Open Sans';
--font-roboto: 'Roboto';
--font-fatface: 'Fatface';
}
/*================================*/
/*===DEFAULT ELEMENT PROPERTIES===*/
/*================================*/
/*Apply default properties to everything.*/
/*especially this*/
* {
box-sizing: border-box;
}
body {
padding: 0px;
margin: 0px;
font-family: var(--font-main);
color: var(--color-font-prime);
background-color: var(--color-bg-main-second);
font-size: var(--font-main-size);
line-height: var(--font-main-line-height);
}
h1 {
font-family: var(--font-h1);
font-size: 2em;
line-height: 1.2em;
position: relative;
}
h2 {
font-family: var(--font-h2);
font-weight: 600;
font-size: 1.5em;
position: relative;
}
h3 {
font-family: var(--font-h3);
font-size: 1.2em;
position: relative;
}
hr {
height: 1px;
background-color: #00000026;
border: none;
}
div {
position: relative;
display: block;
}
br {
line-height: var(--font-main-line-height);
}
a {
display: inline-block;
text-decoration: none;
color: var(--color-link-prime);
}
a:hover {
color: var(--color-link-hover-prime);
}
a:active {
color: var(--color-link-click-prime);
}
blockquote {
background-color: #0000000D;
margin: 25px 20px;
padding: 12px 15px;
border-left: 7px solid;
border-color: #0000003D;
}
code {
font-family: monospace;
white-space: pre;
display: inline-block;
border-radius: 5px;
font-size: 0.8em;
margin: -0.1em 0.2em;
padding: 0em 0.8em;
color: var(--color-font-prime-light);
background-color: #000000AA;
box-shadow: inset 0 0 5px #00000088;
}
sup {
font-size: 0.6em;
position: relative;
vertical-align: bottom;
bottom: 0.5em;
}
sub {
font-size: 0.6em;
position: relative;
vertical-align: bottom;
bottom: -0.5em;
}
/*=======================================================================================================*/
/*===PREDEFINED INTERFACE CLASSES - Classes that are designed with specific interface elements in mind===*/
/*=======================================================================================================*/
/*That wrapper that spans the whole width of the page.*/
.div-wrap-h {
width: 100%;
}
.flex {
display: flex;
flex-direction: row;
}
/*Contains the main content of the site and keeps it centered.*/
.main-container {
width: 1100px;
position: relative;
overflow: auto;
padding: var(--main-container-padding);
background-color: var(--color-bg-main-prime);
margin: 0px auto;
}
.main-container :first-child {
margin-top: 0px;
}
/*Menu bar elements*/
.menu-bar-container {
font-size: var(--font-menu-size);
width: 100%;
display: flex;
background-color: var(--color-main-prime);
overflow: hidden;
z-index: 1000;
}
.menu-bar {
width: 1100px;
display: flex;
margin: 0px auto;
z-index: 0;
}
.menu-button {
flex-grow: 1;
flex-direction: row;
padding: var(--menu-link-padding);
text-align: center;
font-family: var(--font-open-sans);
font-weight: 600;
color: var(--color-font-prime-light);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.menu-button-r, .menu-button-l {
position: absolute;
flex-grow: 0;
padding: var(--menu-link-padding);
padding-right: 20px;
padding-left: 20px;
text-align: center;
color: var(--color-font-prime-light);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
height: fit-content;
z-index: 1;
}
.menu-button-l {
left: 0;
}
.menu-button-r {
right: 0;
}
.menu-button:hover, .menu-button-l:hover, .menu-button-r:hover {
background-color: #0000002A;
color: var(--color-font-prime-light);
}
.menu-button:active, .menu-button-l:active, .menu-button-r:active {
background-color: #0000003A;
color: var(--color-font-prime-light);
}
/*Buttons*/
.button-big {
text-align: center;
background-color: var(--color-main-prime);
color: var(--color-font-prime-light);
padding: 20px 20px;
font-family: var(--font-h2);
font-size: 25px;
margin: 25px 5px;
border-radius: 10px;
}
.button-big:hover {
color: var(--color-font-prime-light);
cursor: pointer;
background-color: var(--color-main-hover);
}
/*That common huge image thing that websites are doing nowadays*/
.div-full-width-img {
position: relative;
width: 100%;
height: 300px;
background-size: cover;
background-position: center;
/*TODO: might not keep the following. It tints the background. Might not work in IE or Edge*/
color: white;
background-color: #AAAAAAFF;
background-blend-mode: multiply;
}
/*A simple framed image*/
.framed-img {
border-radius: 5px;
border: 1px;
border-color: #0000000D;
background-color: var(--color-bg-main-prime);
margin: 20px 20px 10px;
padding: 10px;
max-width: 400px;
max-height: 400px;
box-shadow: 0px 3px 7px 1px #00000044;
}
/*A rounded image*/
.round-img-div {
width: 250px;
height: 250px;
border-radius: 1000px;
overflow: hidden;
background-size: cover;
background-position: center;
}
/*For spoilered text*/
.spoiler {
background-color: black;
color: black;
padding: 0em 0.25em;
}
.spoiler:hover {
color: #CCCCCC
}
/*For quote blocks*/
.quote-source {
text-align: left;
font-style: italic;
padding-right: 30px;
margin-top: 10px;
}
.quote-source:before {
content: "\2014 ";
}
/*code blocks*/
.code-block {
line-height: 1.2em;
padding: 15px 20px;
width: 100%;
margin: 15px 0px;
word-wrap: none;
}
/*badges*/
.badge {
display: inline-block;
border-radius: 2em;
font-size: 0.9em;
margin: -0.1em 0.15em;
padding: 0em 0.6em;
user-select: none;
/*badges don't need to change colors on hover, at least not right now*/
pointer-events: none;
}
/*=====================================================================================================*/
/*===STYLE CLASSES - Classes that apply a style format to the element. Meant for buttons/badges/etc.===*/
/*=====================================================================================================*/
.solid-red {
color: white;
background-color: #AA2020;
}
.solid-red:hover {
background-color: #991010;
}
.solid-green {
color: white;
background-color: #008020;
}
.solid-green:hover {
background-color: #007010;
}
.solid-blue {
color: white;
background-color: #0055AA;
}
.solid-blue:hover {
background-color: #004499
}
/*===========================================================================================*/
/*===TOOL CLASSES - Classes that can be applied to anything to fulfill common layout needs===*/
/*===========================================================================================*/
/*CENTERING CLASSES! Yay!*/
/*These center content inside some RELATIVELY POSITIONED element with a STATICALLY DEFINED HEIGHT and WIDTH.*/
/*Warning: These are positioned absolutely, meaning the parent element should have position: relative (this CSS gives it to divs by default), */
/*and should be sized STATICALLY. (unless you know what you're doing of course).*/
/*In the future I make other center classes that work under more flexible circumstances in order to cover all bases if possible.*/
.center-h {
margin-left: 0px;
margin-right: 0px;
left: 50%;
transform: translateX(-50%);
}
.center-v {
margin-top: 0px;
margin-bottom: 0px;
top: 50%;
transform: translateY(-50%);
}
.center, .center-hv, .center-vh {
margin: 0px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
/*FLOATING CLASSES!*/
.float-r {
display: block;
float: right;
}
.float-l {
display: block;
float: left;
}
/*Div toggle*/
.div-toggle-label {
cursor: pointer;
display: block;
}
.div-toggle {
display: none;
}
.div-toggle:not(:checked) + div {
display: none;
}
/*For toggling the height of things*/
.div-toggle-height {
display: none;
}
.div-toggle-height:not(:checked) + div {
height: 0px;
}
.disabled {
pointer-events: none;
}
/*=========================================================================================*/
/*===ANIMATION CLASSES - Classes to make animating elements easier. Just add keyframes! ===*/
/*=========================================================================================*/
/*Transitioning elements*/
.transition-eo-02s {
transition: all 0.2s ease-out;
}
.transition-ei-02s {
transition: all 0.2s ease-in;
}
.transition-02s {
transition: all 0.2s;
}
/*=========================================================================================*/
/*===MEDIA TAGS - Responsible for ensuring the sit still looks good on all screen sizes.===*/
/*=========================================================================================*/
@media screen and (max-width: 699px) {
.main-container {
width: 100%;
}
.menu-bar {
width: 100%;
flex-direction: column;
}
.float-l, .float-r {
position: relative;
max-width: 92%;
float: none;
}
/*Responsive classes*/
.flex-when-small {
display: flex!important;
}
.block-when-small {
display: block!important;
}
.invisible-when-small {
display: none!important;
}
}
@media screen and (min-width: 700px) and (max-width: 849px) {
.main-container {
width: 700px;
}
.menu-bar {
width: 700px;
flex-direction: column;
}
.float-l, .float-r {
max-width: 550px;
float: none;
}
/*Responsive classes*/
.flex-when-small {
display: flex!important;
}
.block-when-small {
display: block!important;
}
.invisible-when-small {
display: none!important;
}
}
@media screen and (min-width: 800px) and (max-width: 949px) {
}
@media screen and (min-width: 850px) and (max-width: 1199px) {
.main-container {
width: 800px;
}
.menu-bar {
width: 800px;
}
.menu-bar-container {
display: flex!important;
}
/*Responsive classes*/
.flex-when-big {
display: flex!important;
}
.block-when-big {
display: block!important;
}
.invisible-when-big {
display: none!important;
}
}
@media screen and (min-width: 1200px) {
.main-container {
width: var(--main-container-max-width);
}
.menu-bar {
width: var(--main-container-max-width);
}
.menu-bar-container {
display: flex!important;
}
/*Responsive classes*/
.flex-when-big {
display: flex!important;
}
.block-when-big {
display: block!important;
}
.invisible-when-big {
display: none!important;
}
}