-
Notifications
You must be signed in to change notification settings - Fork 0
/
layout.css
86 lines (72 loc) · 1.9 KB
/
layout.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
body {
margin: 0;
}
main {
/*
Center the main content of the page.
Explanation:
- outer max(3vw, ...) causes a minimum padding of 3vw on both sides
- calc((...) / 2 makes same padding formula applicable to both sides
- (100% - min(...)) / 2 calculates padding from width of content
- min(max(100ch, 30vw), 100%) describes the width of the document:
> on small screens the whole with is taken
> on normal screens a paragraph is 100 characters wide
> on large screens the page is at least 30vw wide in order
to not "waste" too much screen space
*/
padding-left: max(3vw, calc((100% - min(max(100ch, 30vw), 100%)) / 2));
padding-right: max(3vw, calc((100% - min(max(100ch, 30vw), 100%)) / 2));
}
h1, h2, h3 {
text-rendering: optimizelegibility;
}
p {
overflow-wrap: break-word;
text-rendering: optimizeSpeed;
}
main + footer {
width: 100vw;
padding-top: 0.5em;
padding-bottom: 0.5em;
}
footer > address {
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
footer > address > * {
padding: 10px;
}
footer > p {
padding: 1em;
}
/* headlines with publishing date */
header > :is(h1, h2):has(+ time) {
margin-bottom: -0.2em;
}
/* dates after headlines */
header > :is(h1, h2) + time {
margin-left: 0.2em;
font-size: small;
}
aside {
float: right;
margin-right: 1ch;
}
.layout-link-button {
padding: 4px 4px 4px 1em;
width: 90%;
display: block;
/* TODO */
}
.blog > article {
margin-bottom: 2em;
border-left-width: 3px;
border-left-style: solid;
padding-left: 4px;
}
.blog p {
margin-top: 0.2em;
margin-bottom: 0.2em;
}