]> Witch of Git - web/blog/blob - _includes/style.css
Style touch-ups
[web/blog] / _includes / style.css
1 /* Basic reset */
2 * { box-sizing: border-box; }
3
4 /* Page structure */
5 html { font-size: 1.4em; line-height: 1.5; color: #444; font-family: "Palatino Linotype", Palatino, serif; }
6 body { padding: 1em; max-width: 700px; margin: 0 auto; min-height: 100vh; }
7 header { margin-bottom: 1em; }
8 footer { margin-top: 1em; }
9
10 /* Typography */
11 h1 { margin: 0; }
12 h1, h2, h3, h4, h5, h6 { margin-bottom: 0; }
13 /* Links */
14 .c-sun { color: #f78123; }
15 .dec-none { text-decoration: none; }
16
17 blockquote {
18 border-left: solid 10px #bbb;
19 padding-left: 1em;
20 margin-left: 1em;
21 font-style: italic;
22 }
23
24 /* Figures */
25 /* @TODO: Make this width managing simpler? */
26 img { max-width: 800px; border-radius: 4px; background: #f5f2f0; }
27 @media (max-width: 825px) { img { max-width: calc(100vw - 1em); } }
28 figure { margin: 0; }
29 figcaption > :first-child, aside > :first-child { margin-top: 0; }
30 figcaption > :last-child, aside > :first-child { margin-bottom: 0; }
31 figcaption { font-style: italic; }
32 .youtube > iframe { border-radius: 4px; }
33
34 aside {
35 border: 1px solid black;
36 padding: 0.75em;
37 margin: -0.5em;
38 border-radius: 4px;
39 }
40 aside.warning { background: #ffecbf; }
41
42 /* Layout classes */
43 .dim { color: #666; }
44 .row { display: flex; flex-direction: row; }
45 .col { display: flex; flex-direction: column; }
46 .hgroup { display: flex; flex-direction: row; }
47 @media (max-width: 500px) { .hgroup { flex-direction: column; } }
48 .row.hcenter { justify-content: center; }
49 .col.hcenter { align-items: center; }
50 .baseline { align-items: baseline; }
51 .spacer { flex-grow: 1; }
52 .ls-none { list-style: none; padding: 0; margin: 0; }
53 .im-icon { background: none; width: 2em; }
54 .hov-fade:hover { filter: invert(50%); }
55 .wide-1, .row > .block-1 { display: inline-block; width: 1em; }
56 .tall-1, .col > .block-1 { display: inline-block; height: 1em; }
57
58 /* Barebones un-highlighted code blocks */
59 pre > code {
60 overflow: auto;
61 width: calc(100% + 8em);
62 margin: 0 -4em;
63 display: inline-block;
64 max-width: 100vw;
65 font-size: 18px;
66 box-sizing: border-box;
67 padding: 1em;
68 border-radius: 6px;
69 background: #f5f2f0;
70 }
71
72 @media (max-width: calc(700px + 9em)) {
73 pre > code { margin: 0 -1em; width: calc(100% + 2em); }
74 }